_id stringlengths 64 64 | repository stringlengths 6 84 | name stringlengths 4 110 | content stringlengths 0 248k | license null | download_url stringlengths 89 454 | language stringclasses 7
values | comments stringlengths 0 74.6k | code stringlengths 0 248k |
|---|---|---|---|---|---|---|---|---|
696f215664b60eb457e55af7c6a0d4088296020a7f5e36874d8dee2a80ed0512 | danr/hipspec | Nicomachus.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Nicomachus where
import Prelude hiding ((+),(*))
import HipSpec.Prelude
import Test.QuickSpec.Signature
data Nat = Z | S Nat deriving (Eq,Ord,Show,Typeable)
(+) :: Nat -> Nat -> Nat
S n + m = S (n + m)
Z + m = m
(*) :: Nat -> Nat -> Nat
S n * m = m + (n * m)
Z * m = Z
... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/testsuite/examples/Nicomachus.hs | haskell | # LANGUAGE DeriveDataTypeable # | module Nicomachus where
import Prelude hiding ((+),(*))
import HipSpec.Prelude
import Test.QuickSpec.Signature
data Nat = Z | S Nat deriving (Eq,Ord,Show,Typeable)
(+) :: Nat -> Nat -> Nat
S n + m = S (n + m)
Z + m = m
(*) :: Nat -> Nat -> Nat
S n * m = m + (n * m)
Z * m = Z
tri :: Nat -> Nat
tri Z = Z
tri... |
19101fb435ded4babbbc7fafd9ec26b680d2547b1713b0f8234dffc8ad68ca12 | alandipert/enduro | project.clj | (defproject alandipert/enduro-example-hitcounter "0.0.1-SNAPSHOT"
:description "An example Heroku application using enduro for persistence."
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.4.0"]
[ring/ring-core "1.1.6"]
[ring/ring-jetty-adapter "1.1.6"]
... | null | https://raw.githubusercontent.com/alandipert/enduro/521468070bf7c92661feb8d428b85f5fe62e8503/examples/hitcounter/project.clj | clojure | (defproject alandipert/enduro-example-hitcounter "0.0.1-SNAPSHOT"
:description "An example Heroku application using enduro for persistence."
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.4.0"]
[ring/ring-core "1.1.6"]
[ring/ring-jetty-adapter "1.1.6"]
... | |
f4bcdc7ef431a8def3da5cb11f9c4b445a4cca9ccb9cdd6471c037dbb03a1176 | fogfish/typhoon | aura_ingress.erl | %%
%% Copyright 2015 Zalando SE
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/aura/src/aura_ingress.erl | erlang |
Copyright 2015 Zalando SE
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licens... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(aura_ingress).
-behaviour(pipe).
-author('').
-export([
start_link/0
,init/1
,free/2
,ioctl/2
,handle/3
]).
start_link() ->
pipe:start_link(?MODULE,... |
964ed17364d055816fc2620d88c7561f45211feb3158f232cc17f915dcc0731e | kadena-io/pact | SizeOf.hs | # LANGUAGE MagicHash #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE DefaultSignatures #
# LANGUAGE CPP #
#if defined(ghcjs_HOST_OS)
# LANGUAGE TypeApplications #
#endif
-- |
-- Module : Pact.Types.S... | null | https://raw.githubusercontent.com/kadena-io/pact/64d58454d277394bfcbfc1882cdd2af343f8dd81/src/Pact/Types/SizeOf.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Pact.Types.SizeOf
License : BSD-style (see the file LICENSE)
| Estimate of number of bytes needed to represent data type
General approach:
Memory Consumption = Constructor Header Size + Cost of Constructor Field(s)
Resources:
| Total cost for constructor... | # LANGUAGE MagicHash #
# LANGUAGE LambdaCase #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE DefaultSignatures #
# LANGUAGE CPP #
#if defined(ghcjs_HOST_OS)
# LANGUAGE TypeApplications #
#endif
Copyright : ( C ) 2019
Maintainer : < >
module Pact... |
ad86e46b6b75c78a3deaf13681e6d21708933ea5675f96eb1972f9ae7f2f1c71 | ucsd-progsys/nate | pathname.mli | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/ocamlbuild/pathname.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
Original author :
include Signatures.PATHNAME
val ... |
e21c2256eb36dc96a3fff070c866afa83741327390515ca9b9f858afc596a967 | bradparker/servant-beam-realworld-example-app | Main.hs | module Main
( main
) where
import Data.Aeson (ToJSON, encode)
import qualified Data.CaseInsensitive as CI
import Data.Default (def)
import Data.Map (singleton)
import Network.Wai.Middleware.Cors (simpleCorsResourcePolicy, cors, corsRequestHeaders, corsMethods)
import Network.Wai (Middleware)
import Network.Wai.Han... | null | https://raw.githubusercontent.com/bradparker/servant-beam-realworld-example-app/d4a0d79d9dbc7e5b8987b367ac32f99ac3cc20e7/app/Main.hs | haskell | module Main
( main
) where
import Data.Aeson (ToJSON, encode)
import qualified Data.CaseInsensitive as CI
import Data.Default (def)
import Data.Map (singleton)
import Network.Wai.Middleware.Cors (simpleCorsResourcePolicy, cors, corsRequestHeaders, corsMethods)
import Network.Wai (Middleware)
import Network.Wai.Han... | |
ab2c022865aeb7bcd6842b03fb3d9c3553247e58d63f5520c3f4ea080488e649 | danr/hipspec | BExp.hs | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
# LANGUAGE EmptyDataDecls , RankNTypes , ScopedTypeVariables #
-
This is an example about Boolean Expressions from the Isabelle
tutorial " A Proof Assistant for Higher Order Logic " , section
2.5.6 . This - file was generated automatically from the
corresp... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/BExp.hs | haskell | } | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
# LANGUAGE EmptyDataDecls , RankNTypes , ScopedTypeVariables #
-
This is an example about Boolean Expressions from the Isabelle
tutorial " A Proof Assistant for Higher Order Logic " , section
2.5.6 . This - file was generated automatically from the
corresp... |
fca1e0c633d06c7aa89a0da939a5c40e96b89e09cbf040a5585a1975afb1f6af | dterei/SafeHaskellExamples | a11.hs | {-# LANGUAGE Safe #-}
{-# LANGUAGE Safe #-}
module Main where
main = putStrLn "Hello World"
| null | https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/flags/a11.hs | haskell | # LANGUAGE Safe #
# LANGUAGE Safe # | module Main where
main = putStrLn "Hello World"
|
0af4670fe0849b37ddfb6a949e209122f6bb82d172240537faf0c644e674b7c6 | digitallyinduced/ihp-blog-example-app | New.hs | module Web.View.Posts.New where
import Web.View.Prelude
data NewView = NewView { post :: Post }
instance View NewView where
html NewView { .. } = [hsx|
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href={PostsAction}>Posts</a></li>
<li class="brea... | null | https://raw.githubusercontent.com/digitallyinduced/ihp-blog-example-app/a79824f2587701f537487d86d514b86dae9f6834/Web/View/Posts/New.hs | haskell | module Web.View.Posts.New where
import Web.View.Prelude
data NewView = NewView { post :: Post }
instance View NewView where
html NewView { .. } = [hsx|
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href={PostsAction}>Posts</a></li>
<li class="brea... | |
c34b7fef879372d6bec51985c1f456544d580aeaab829bbdc72c75c874311e8f | naoiwata/sicp | 2.5.0.scm | ;; @author naoiwata
SICP Chapter2
2.5 Systems with Generic Operations | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/pages/2.5.0.scm | scheme | @author naoiwata | SICP Chapter2
2.5 Systems with Generic Operations |
e4bc542f46fbf34713fac437d528c3475769abca5b703f3e32c677c7ba432bb7 | hslua/hslua | PushableTests.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
|
Module : HsLua . Class . PushableTests
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : stable
Portability : portable
Test for the interoperability between and .
Module : ... | null | https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-classes/test/HsLua/Class/PushableTests.hs | haskell | # LANGUAGE OverloadedStrings #
| Specifications for Attributes parsing functions. | # LANGUAGE TypeApplications #
|
Module : HsLua . Class . PushableTests
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : stable
Portability : portable
Test for the interoperability between and .
Module : HsLua.Class.PushableTests
Copyrigh... |
60b6e403c0c99458c651ff662ee6c6b1fb9299b3542a1096012a5b4273105128 | trptcolin/reply | conversions.clj | (ns reply.conversions)
(defn ->fn [config default]
(cond (fn? config) config
(seq? config) (eval config)
(symbol? config) (eval config)
:else default))
| null | https://raw.githubusercontent.com/trptcolin/reply/f0c730e7a6753494f9f90f02234bc040318da393/src/clj/reply/conversions.clj | clojure | (ns reply.conversions)
(defn ->fn [config default]
(cond (fn? config) config
(seq? config) (eval config)
(symbol? config) (eval config)
:else default))
| |
d18418f4994b8bab7054998844a439866e3a0832a2d2105b860f1f160f78d5ea | jafingerhut/clojure-benchmarks | binarytrees.clj-3.clj | The Computer Language Benchmarks Game
;; /
;
Adapted from the Java -server version
;
contributed by
modified by , restructured to allow usage of ' pmap '
modified by to use faster primitive math ops
(ns binarytrees
(:gen-class))
(set! *warn-on-reflection* true)
(defrecord TreeNode [left right ^int ... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/binarytrees/binarytrees.clj-3.clj | clojure | /
| The Computer Language Benchmarks Game
Adapted from the Java -server version
contributed by
modified by , restructured to allow usage of ' pmap '
modified by to use faster primitive math ops
(ns binarytrees
(:gen-class))
(set! *warn-on-reflection* true)
(defrecord TreeNode [left right ^int item])
(... |
cc1ddcafa6a2d970ad177286bc5343e842759b65e79f0761407c3b03d5512519 | aeternity/aeternity | aeu_validation.erl | -module(aeu_validation).
-export([run/1, run/2]).
run(Checks) ->
run(Checks, []).
run([], _Args) ->
ok;
run([F | Rest], Args) ->
case apply(F, Args) of
ok ->
run(Rest, Args);
{error, _Reason} = Error ->
Error
end.
| null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aeutils/src/aeu_validation.erl | erlang | -module(aeu_validation).
-export([run/1, run/2]).
run(Checks) ->
run(Checks, []).
run([], _Args) ->
ok;
run([F | Rest], Args) ->
case apply(F, Args) of
ok ->
run(Rest, Args);
{error, _Reason} = Error ->
Error
end.
| |
f64dd45ddccd707e576834dfce895a22436171abe917b513f9de28d19221a6c5 | ocsigen/tyxml | tyxml_xml.ml | TyXML
*
* Copyright ( C ) 2004 < >
* Copyright ( C ) 2007
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking excepti... | null | https://raw.githubusercontent.com/ocsigen/tyxml/8551b673857fdc1defebe7c502ffcb920f04009e/implem/tyxml_xml.ml | ocaml | * Attributes
* Element | TyXML
*
* Copyright ( C ) 2004 < >
* Copyright ( C ) 2007
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking excepti... |
cf7f3ebc9720230e9ff2f23a0cb46bde4a1849a59123a9f5ea5147766df9898a | sile/taomp-sbcl | periodic.lisp | (defpackage periodic
(:use :common-lisp :util)
(:export make
traverse))
(in-package :periodic)
(defstruct balancer
(toggle t :type boolean)
(lock (@make-lock) :type @lock))
(defun balancer-traverse (balancer)
(with-slots (toggle lock) (the balancer balancer)
(@with-lock lock
(prog1 (if... | null | https://raw.githubusercontent.com/sile/taomp-sbcl/6216891346160e613fae3bb73491bc8c8fbad1c4/c12/periodic.lisp | lisp | lo
hi
lo
hi | (defpackage periodic
(:use :common-lisp :util)
(:export make
traverse))
(in-package :periodic)
(defstruct balancer
(toggle t :type boolean)
(lock (@make-lock) :type @lock))
(defun balancer-traverse (balancer)
(with-slots (toggle lock) (the balancer balancer)
(@with-lock lock
(prog1 (if... |
ded9fabc227a0a1078ba4fcc9392ea86b53947f98cc1ea991f8ed699314728bf | day8/re-frame-10x | dom.cljs | (ns day8.re-frame-10x.inlined-deps.spade.git-sha-93ef290.container.dom
"The DomStyleContainer renders styles into DOM elements. References to those
elements are stored in a `styles` atom, or `*injected-styles*` if that is
not provided. Similarly, if no `target-dom` is provided, the `document.head`
element is... | null | https://raw.githubusercontent.com/day8/re-frame-10x/e7105ccc00b8458cdb2e5696eecc4b8602b53bca/gen-src/day8/re_frame_10x/inlined_deps/spade/git_sha_93ef290/container/dom.cljs | clojure | (ns day8.re-frame-10x.inlined-deps.spade.git-sha-93ef290.container.dom
"The DomStyleContainer renders styles into DOM elements. References to those
elements are stored in a `styles` atom, or `*injected-styles*` if that is
not provided. Similarly, if no `target-dom` is provided, the `document.head`
element is... | |
14d53f860806cc9120be097fe9bac9f3ff813a4eb98140029dc3f0a2cf37a844 | mwand/eopl3 | interp.scm | (module interp (lib "eopl.ss" "eopl")
interpreter for the LEXADDR language .
(require "drscheme-init.scm")
(require "lang.scm")
(require "data-structures.scm")
(require "environments.scm")
(provide value-of-translation value-of)
;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;;
value - of - transl... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter3/lexaddr-lang/interp.scm | scheme | the interpreter ;;;;;;;;;;;;;;;; | (module interp (lib "eopl.ss" "eopl")
interpreter for the LEXADDR language .
(require "drscheme-init.scm")
(require "lang.scm")
(require "data-structures.scm")
(require "environments.scm")
(provide value-of-translation value-of)
value - of - translation : Nameless - program - > ExpVal
(define v... |
432a32b81756c9240246047838879c93fba0e29111e287fb5df4537d6fbca431 | babashka/babashka | agent_test.clj | (ns babashka.agent-test
(:require
[babashka.test-utils :as test-utils]
[clojure.edn :as edn]
[clojure.test :as t :refer [deftest is]]))
(deftest agent-binding-conveyance-test
(let [prog
"(def ^:dynamic *foo* 1) (def a (agent nil)) (binding [*foo* 2] (send-off a (fn [_] *foo*))) (await a) @a"]
... | null | https://raw.githubusercontent.com/babashka/babashka/a942befc652cdd28a4df8b8c6ea5d0f50aef3134/test/babashka/agent_test.clj | clojure | (ns babashka.agent-test
(:require
[babashka.test-utils :as test-utils]
[clojure.edn :as edn]
[clojure.test :as t :refer [deftest is]]))
(deftest agent-binding-conveyance-test
(let [prog
"(def ^:dynamic *foo* 1) (def a (agent nil)) (binding [*foo* 2] (send-off a (fn [_] *foo*))) (await a) @a"]
... | |
05aa1c1d52db169f80220ce753f3c5dca05a2a4806355a9f0f8ee5da0531bc6f | gwathlobal/CotD | init-mob-types.lisp | (in-package :cotd)
;;--------------------
;; MOB-TEMPLATE Declarations
;;--------------------
;;--------------------
CITIZENS
;;--------------------
(set-mob-type (make-instance 'mob-type :mob-type +mob-type-player+
:glyph-idx 32 :glyph-color sdl:*white* :back-c... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/init-mob-types.lisp | lisp | --------------------
MOB-TEMPLATE Declarations
--------------------
--------------------
--------------------
--------------------
CHURCH
--------------------
--------------------
--------------------
--------------------
CRIMINALS
--------------------
--------------------
MILITARY
-----------------... | (in-package :cotd)
CITIZENS
(set-mob-type (make-instance 'mob-type :mob-type +mob-type-player+
:glyph-idx 32 :glyph-color sdl:*white* :back-color sdl:*black* :max-hp 20 :max-fp 0
:faction +faction-type-civilians+
... |
83fde93a21f85bdb24609d03b108941dab4af9c724e7053aba764e328f4d79a6 | zeniuseducation/poly-euler | p94.clj | (ns poly-euler.next.p82
(:require
[clojure.set :refer [union difference intersection]]))
(set! *unchecked-math* true)
(defn psqr?
[n]
(let [ck (Math/sqrt n)]
(= (Math/floor ck) (Math/ceil ck))))
(defn sqr [x] (* x x))
(defn ^long area-triangles
[^long lim]
(loop [i (int 2) res 0]
(if (>= (* 3 i... | null | https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/clojure/next/p94.clj | clojure | (ns poly-euler.next.p82
(:require
[clojure.set :refer [union difference intersection]]))
(set! *unchecked-math* true)
(defn psqr?
[n]
(let [ck (Math/sqrt n)]
(= (Math/floor ck) (Math/ceil ck))))
(defn sqr [x] (* x x))
(defn ^long area-triangles
[^long lim]
(loop [i (int 2) res 0]
(if (>= (* 3 i... | |
daabd4f9ce674884a86cf249687bb7a25fc7b81c7c522004806a4247912914b4 | phantomics/seed | extension.lisp | ;;;; extension.lisp
(in-package #:seed.ui-model.react)
(export 'standard-vector-effects)
| null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.ui-effects.vector.base/extension.lisp | lisp | extension.lisp |
(in-package #:seed.ui-model.react)
(export 'standard-vector-effects)
|
1e1daff1bd6fe66e8b6cc25fd3b13ec598e21361e975deaeee5ec7d8142e615c | ocaml-flambda/flambda-backend | flow.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/92dbdba868235321a48916b8f1bb3f04ee884d3f/middle_end/flambda2/simplify/flow/flow.mli | ocaml | ************************************************************************
OCaml
... | and , OCamlPro
Copyright 2021 - -2021 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
module Acc : sig
type t
val print : Format.formatter -> t -> unit
{ 2 Creation and updates }
val empty : unit... |
ad01c94efd793e86a5a007b4a0afb5bdecf3fe1a326200fb12fcb0781a21b32a | rubenbarroso/EOPL | 5_16.scm | like fieldref - exp , but passing self
(superfieldref-exp (obj-exp field-id)
(let ((obj (apply-env env 'self)))
(lookup-field field-id
(object->field-ids obj)
(object->fields obj))))
;like fieldset-exp, but passing self
(superfie... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter5/5_16.scm | scheme | like fieldset-exp, but passing self | like fieldref - exp , but passing self
(superfieldref-exp (obj-exp field-id)
(let ((obj (apply-env env 'self)))
(lookup-field field-id
(object->field-ids obj)
(object->fields obj))))
(superfieldset-exp (obj-exp field-id rhs-exp)
... |
343f4db7de76309ba1ad60d8c51bb0e0ce7e3cca56567841582789706c80af7a | hkuplg/fcore | HeapSort.hs | # LANGUAGE TemplateHaskell #
module HeapSort where
1 . Try " runTests " in the terminal to test all the properties
2 . Try " multiTestNv " to test the naive version of " prop_buggyRemoveMaxNv " 10 times with time
showed below .
3 . Try " multiTestCl " to test the clever version of " prop_buggyRemoveMaxCl ... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/examples/case_studies/HeapSort.hs | haskell | -------------test data generator and shrink for Heap-------------------------
----------------------------------------------------------------------
function "rank"
function "rootVal"
function "heapSize"
--test for heapSize
function "heapContents"
function "merge"
--test for merge
--------------------------------------... | # LANGUAGE TemplateHaskell #
module HeapSort where
1 . Try " runTests " in the terminal to test all the properties
2 . Try " multiTestNv " to test the naive version of " prop_buggyRemoveMaxNv " 10 times with time
showed below .
3 . Try " multiTestCl " to test the clever version of " prop_buggyRemoveMaxCl ... |
c966c70413579f5c0ba1c8589b900cfd1078b57b1e2b36c9e00423f9e829facd | wdebeaum/step | wealth.lisp | ;;;;
;;;; W::WEALTH
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::WEALTH
(SENSES
((LF-PARENT ONT::assets) (TEMPL mass-PRED-TEMPL)
(META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL
:COMMENTS HTML-PURCHASING-CORPUS))))
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wealth.lisp | lisp |
W::WEALTH
|
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::WEALTH
(SENSES
((LF-PARENT ONT::assets) (TEMPL mass-PRED-TEMPL)
(META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL
:COMMENTS HTML-PURCHASING-CORPUS))))
))
|
8e12b294f05b587517d173ea44cedb1c7d1d07144abff2dd16ae8ec6f5c8411b | lisp-mirror/cl-tar | utils.lisp | ;;;; utils
;;;;
;;;; This is part of cl-tar. See README.md and LICENSE for more information.
(in-package #:tar)
(alexandria:define-constant +mode-permissions+
'(:set-user-id :set-group-id :sticky
:user-read :user-write :user-exec
:group-read :group-write :group-exec
:other-read :other-write :oth... | null | https://raw.githubusercontent.com/lisp-mirror/cl-tar/7c6e07a10c93d9e311f087b5f6328cddd481669a/src/utils.lisp | lisp | utils
This is part of cl-tar. See README.md and LICENSE for more information. |
(in-package #:tar)
(alexandria:define-constant +mode-permissions+
'(:set-user-id :set-group-id :sticky
:user-read :user-write :user-exec
:group-read :group-write :group-exec
:other-read :other-write :other-exec)
:test 'equal)
(defun mode-to-permissions (mode)
(loop
:for permission :in +... |
10f950dd5a07b2e4b6f6f96747ac17e36769bb4eef9345ae3a72b3ba00ff6036 | janestreet/merlin-jst | parse.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_413/parsing/parse.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let last_token = ref Parser.EOF
let token lexbuf =
let token = Lexer.token lexbuf in
last_token :=... |
2a5ee5ebb51f2ccd013a8154fc90f4e7633e47747bb65b84db3f4f4e5dc9f14c | cabol/shards | shards_group.erl | %%%-------------------------------------------------------------------
%%% @doc
%%% This module provides a dynamic supervisor for creating and/or
%%% deleting tables dynamically in runtime and as part of an existing
%%% supervision tree; any application supervision tree using `shards'.
%%%
%%% <h2>Usage</h2>
%%% To use... | null | https://raw.githubusercontent.com/cabol/shards/814ebf1f12e0a9e17ee2788ad8dbe4627b5c1d9b/src/shards_group.erl | erlang | -------------------------------------------------------------------
@doc
This module provides a dynamic supervisor for creating and/or
deleting tables dynamically in runtime and as part of an existing
supervision tree; any application supervision tree using `shards'.
<h2>Usage</h2>
To use `shards' and make the c... | { ok , { { one_for_one , 10 , 10 } , Children } } .
> { ok , Pid , Tab } = shards_group : new_table(GroupName , mytab , [ ] ) .
-module(shards_group).
-behavior(supervisor).
-export([
start_link/0,
start_link/1,
stop/1,
stop/2,
child_spec/1,
new_table/3,
del_table/2,
start_table/2
]).
-export(... |
1d89be2705dd2ed49874b27e9e8254d1c010e44011990e51519f3d6eeb7c18f4 | mbutterick/txexpr | main.rkt | #lang racket/base
(require "../main.rkt" sugar/define)
(module+ test
(require rackunit "../main.rkt"))
(define+provide+safe (attr-ref* tx key)
(txexpr? can-be-txexpr-attr-key? . -> . txexpr-attr-values?)
(define results empty)
(let loop ([tx tx])
(when (and (txexpr? tx) (attrs-have-key? tx key) (attr-ref ... | null | https://raw.githubusercontent.com/mbutterick/txexpr/435c6e6f36fd39065ae9d8a00285fda0e4e41fa1/txexpr/unstable/main.rkt | racket | convert list of alternating keys & values to attr
with override behavior (using hash) | #lang racket/base
(require "../main.rkt" sugar/define)
(module+ test
(require rackunit "../main.rkt"))
(define+provide+safe (attr-ref* tx key)
(txexpr? can-be-txexpr-attr-key? . -> . txexpr-attr-values?)
(define results empty)
(let loop ([tx tx])
(when (and (txexpr? tx) (attrs-have-key? tx key) (attr-ref ... |
566eed91fcff23659edda270ded58b274238a28f40432f9cc85a342df9684b55 | openmusic-project/openmusic | midieditor.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/91e76ddb180877a64dbf077080381bb1fe2a43af/OPENMUSIC/code/projects/midi/editors/midieditor.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
d87be2ac7c430f3af78a55923e43cd0d909035f9b531e0999276399de235d67d | google/codeworld | source.hs | {-
REQUIRES
Description: typeSignatures success
Rules:
- typeSignatures: true
-}
program :: Program
program = drawingOf(codeWorldLogo) | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/requirements_typeSignaturesSuccess/source.hs | haskell |
REQUIRES
Description: typeSignatures success
Rules:
- typeSignatures: true
|
program :: Program
program = drawingOf(codeWorldLogo) |
b32af7bc4313e6e80f5363e36449f128e163600150ef9ab5f19b596fb5658dda | racket/frtime | push-pull-ball.rkt | #lang frtime
(require frtime/animation)
(define radius (new-cell 20))
(define pos1
(rec pos
(until (make-posn 200 200)
(inf-delay
(let ([brnch (posn+ pos
(posn* (normalize (posn- mouse-pos pos))
(- (posn-diff pos mous... | null | https://raw.githubusercontent.com/racket/frtime/9b9db67581107f4d7b995541c70f2d08f03ae89e/demos/push-pull-ball.rkt | racket | #lang frtime
(require frtime/animation)
(define radius (new-cell 20))
(define pos1
(rec pos
(until (make-posn 200 200)
(inf-delay
(let ([brnch (posn+ pos
(posn* (normalize (posn- mouse-pos pos))
(- (posn-diff pos mous... | |
17919a5e509d2c1f7395d52b20242eabf16fbbbbef62cefd3109d8feca9cc775 | DavidAlphaFox/RabbitMQ | rabbit_exchange_type_consistent_hash_test.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-consistent-hash-exchange/test/src/rabbit_exchange_type_consistent_hash_test.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
Because the rou... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Consistent Hash Exchange .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2011 - 2014 GoPivotal , Inc. All r... |
58c690a99496a6da314ccd402664884ac1c0717a361df88debd4214cbd5b5133 | S8A/htdp-exercises | ex495.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex495) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex495.rkt | racket | about the language level of this file in a form that our tools can easily process.
[List-of Number] -> Number
adds up the numbers from the given list
[List-of Number] -> Number
adds up the numbers from the given list
[List-of Number] Number -> Number
computes the sum of the numbers on alon
accumulator a is the ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex495) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define (sum.v1 alon)
(cond
[(empty? alon) 0]
... |
3498bea392d0f5a4956d35e1a3463447d635dccf07168d4ca4b39546a79eea23 | input-output-hk/cardano-addresses | Version.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
-- |
Copyright : © 2018 - 2021 IOHK
-- License: Apache-2.0
module Cardano.Address.JSAPI.Version
( export
) where
import Prelude
import Control.Lens
( (^... | null | https://raw.githubusercontent.com/input-output-hk/cardano-addresses/266fdbe20a56747efa29c0279982eb1fc9092fff/jsapi/lib/Cardano/Address/JSAPI/Version.hs | haskell | |
License: Apache-2.0 | # LANGUAGE FlexibleContexts #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
Copyright : © 2018 - 2021 IOHK
module Cardano.Address.JSAPI.Version
( export
) where
import Prelude
import Control.Lens
( (^.) )
import Control.Monad
... |
6e7ae97b3b2d65c2a0a7075681b0224531530d9ac1d2d5ebf757afde86f3c3df | vikram/lisplibraries | address.lisp | ;;;; -*- lisp -*-
(in-package :it.bese.ucw-user)
(defentry-point "address.ucw" (:application *example-application*) ()
(call 'show-address :address (call 'get-address)))
(defclass address ()
((name :accessor name :initarg :name :initform "")
(email :accessor email :initarg :email :initform "")))
(defcomponen... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_ajax/examples/src/address.lisp | lisp | -*- lisp -*- |
(in-package :it.bese.ucw-user)
(defentry-point "address.ucw" (:application *example-application*) ()
(call 'show-address :address (call 'get-address)))
(defclass address ()
((name :accessor name :initarg :name :initform "")
(email :accessor email :initarg :email :initform "")))
(defcomponent address-manipula... |
a3cda758d8a39d5587c0ab282ca937d86aa94c696d575abcb4bd2e8f406e73a8 | ml4tp/tcoq | derive.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/plugins/derive/derive.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* [start_deriving f suchthat lemma] ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Context.Named.Declaratio... |
e8e6a7d232a0c7d135e662b0283fd52bbc8b42023b992a1869039654299fd4f4 | JacquesCarette/Drasil | Helpers.hs | -- | Routines to help with Symbols and Stages.
module Language.Drasil.Symbol.Helpers(eqSymb, codeSymb, hasStageSymbol,
autoStage, hat, prime, staged, sub, subStr, sup, unicodeConv, upperLeft,
vec, label, variable) where
import Data.Char (isLatin1, toLower)
import Data.Char.Properties.Names (getCharacterName)
impor... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-lang/lib/Language/Drasil/Symbol/Helpers.hs | haskell | | Routines to help with Symbols and Stages.
| Helper for creating smart constructors for 'Symbol's.
| Label smart constructor, requires non-empty labels
| Variable smart constructor, requires non-empty variables
| Helper function for getting a symbol in the Implementation Stage.
| Finds if a 'Stage' symbol is rea... | module Language.Drasil.Symbol.Helpers(eqSymb, codeSymb, hasStageSymbol,
autoStage, hat, prime, staged, sub, subStr, sup, unicodeConv, upperLeft,
vec, label, variable) where
import Data.Char (isLatin1, toLower)
import Data.Char.Properties.Names (getCharacterName)
import Data.List.Split (splitOn)
import Language.Dr... |
e22b33caf00ef9e565ef0cfdc66a3c997181aa09ed690b3e6afd7bfe8aaa59df | 8c6794b6/haskell-sc-scratch | IRCBot.hs | ------------------------------------------------------------------------------
-- |
-- Module : $Header$
CopyRight : ( c ) 8c6794b6
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : non-portable
--
-- From:
--
-- *
--
module IRCBot where
import Network
import System.IO
impor... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Net/IRCBot.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : non-portable
From:
*
| CopyRight : ( c ) 8c6794b6
Maintainer :
module IRCBot where
import Network
import System.IO
import Text.Printf
server = "irc.freenode.org"
port = 6667
chan = "#tutbot-testing"
nick = "tutbot"
main :: IO ()
main = do
h <- connectTo server (PortNumber port)
hSetBuffering h NoBuffering
write h "NICK" ni... |
cf0d2f4ef39ab1a54f4b7fe4e36cc72e873836ce03cd084b9421acc176a02c5d | janestreet/bonsai | blog_letsub.ml | open Core
(* $MDX part-begin=lang *)
type t =
| Const of int
| Add of t * t
| Map of
{ t : t
; f : int -> int
}
let const i = Const i
let add x y = Add (x, y)
let map t ~f = Map { t; f }
let rec eval : t -> int = function
| Const i -> i
| Add (x, y) -> eval x + eval y
| Map { t; f } -> ... | null | https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/docs/blogs/letsub/src/blog_letsub.ml | ocaml | $MDX part-begin=lang
$MDX part-end
$MDX part-begin=use1
$MDX part-end
$MDX part-begin=applicative
$MDX part-end
$MDX part-begin=arrow
$MDX part-end
$MDX part-begin=cache
$MDX part-end
$MDX part-begin=cache-test
$MDX part-end
$MDX part-end
$MDX part-begin=bonsai2
$MDX part-end
$MDX part-en... | open Core
type t =
| Const of int
| Add of t * t
| Map of
{ t : t
; f : int -> int
}
let const i = Const i
let add x y = Add (x, y)
let map t ~f = Map { t; f }
let rec eval : t -> int = function
| Const i -> i
| Add (x, y) -> eval x + eval y
| Map { t; f } -> f (eval t)
;;
let print_a... |
8d6ed96bd14f0179e55afc1d556007cac32699472d04cb129b6385b417480a60 | ghc/nofib | VBlldecomp.hs | -- Glasgow Haskell 0.403 : BLAS ( Basic Linear Algebra System )
-- **********************************************************************
-- * *
* FILE NAME : vblldecomp.hs DATE : 5 - 3 - 1991 *
-- * ... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/fem/VBlldecomp.hs | haskell | Glasgow Haskell 0.403 : BLAS ( Basic Linear Algebra System )
**********************************************************************
* *
* *
* CONTENTS : LL decomposition method for ... | * FILE NAME : vblldecomp.hs DATE : 5 - 3 - 1991 *
module VBlldecomp(vblldecomp, vbllsolution, vbllsolution') where
import Basics
import Vector
import VBmatrix
vblldecomp :: Vbm Float -> Vbm Float
* * * = SUM [ L[i , , k ] | k < - [ 1 .. i-1 ] ]
* * * = SUM [ L[i , k]*L[j , k ] |... |
b4ac43c3efe4a106c6123a8ad2586cf1e853cb99d90b72eb5cfda1bbaaeb787a | input-output-hk/plutus | QuickCheck.hs | module PlutusIR.Generators.QuickCheck (module X) where
import PlutusIR.Generators.QuickCheck.Common as X
import PlutusIR.Generators.QuickCheck.GenerateTerms as X
import PlutusIR.Generators.QuickCheck.ShrinkTerms as X
| null | https://raw.githubusercontent.com/input-output-hk/plutus/febabc4e20f7b57b9ceda576f2b1268966712ff6/plutus-core/testlib/PlutusIR/Generators/QuickCheck.hs | haskell | module PlutusIR.Generators.QuickCheck (module X) where
import PlutusIR.Generators.QuickCheck.Common as X
import PlutusIR.Generators.QuickCheck.GenerateTerms as X
import PlutusIR.Generators.QuickCheck.ShrinkTerms as X
| |
5f456dab9304885ef3ca2e87f7abc692caf5d228eb09d4d9e409f8cb000a4392 | gilith/hol-light | test.ml | (* ========================================================================= *)
(* OPENTHEORY TEST THEORY *)
(* ========================================================================= *)
(* -----------... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/test.ml | ocaml | =========================================================================
OPENTHEORY TEST THEORY
=========================================================================
-------------------------------------------------------------------------
Start exporting... |
export_begin ();;
new_constant ("a", `:bool`);;
new_constant ("b", `:bool`);;
new_constant ("c", `:bool`);;
let test_ab_ax = new_axiom `a = b`;;
let test_bc_ax = new_axiom `b = c`;;
let opentheory_unwanted_id_def =
let th = new_basic_definition... |
57cc61e1db4f591e1a7cd709177c1088b4f29a1968f5189f4fb7f04b22f9e23d | takikawa/racket-ppa | intermediate-funs.rkt | #lang at-exp scheme/base
(require "teachprims.rkt" "and-or-map.rkt"
lang/posn
mzlib/etc
(only-in racket/list argmin argmax)
syntax/docprovide
(for-syntax scheme/base))
;; Documents the procedures:
(require "provide-and-scribble.rkt")
(provide-and-scribble
procedures
(b... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/share/pkgs/htdp-lib/lang/private/intermediate-funs.rkt | racket | Documents the procedures: | #lang at-exp scheme/base
(require "teachprims.rkt" "and-or-map.rkt"
lang/posn
mzlib/etc
(only-in racket/list argmin argmax)
syntax/docprovide
(for-syntax scheme/base))
(require "provide-and-scribble.rkt")
(provide-and-scribble
procedures
(begin
(require scribble/man... |
21cb4420593db1f96bae85a1e62fa20e39a018454cf241d7a9d275e361f2b3a0 | philnguyen/soft-contract | set-basics.rkt | #lang racket
(define s (set 1 2 3))
(define s1 (set-add s "bar"))
(define s2 (set))
(provide
(contract-out
[s1 (set/c integer?)]))
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/issues/set-basics.rkt | racket | #lang racket
(define s (set 1 2 3))
(define s1 (set-add s "bar"))
(define s2 (set))
(provide
(contract-out
[s1 (set/c integer?)]))
| |
bb328de5662831f4cfd633b63306659bb03f1dc9d2d1db8f3e90c50a36b4a7a7 | maybevoid/casimir | Freer.hs |
module Casimir.Freer.Monad.Freer
( FreerMonad (..)
, FreerF (..)
)
where
import Control.Monad
import Casimir.Base
import Casimir.Freer.CoOp
import Casimir.Freer.FreeOps
import Casimir.Freer.FreeEff
data FreerF ops a b where
PureF :: a -> FreerF ops a b
FreeF
:: forall ops a b x
. CoOperation ops... | null | https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Freer/Monad/Freer.hs | haskell | # INLINE (>>=) # |
module Casimir.Freer.Monad.Freer
( FreerMonad (..)
, FreerF (..)
)
where
import Control.Monad
import Casimir.Base
import Casimir.Freer.CoOp
import Casimir.Freer.FreeOps
import Casimir.Freer.FreeEff
data FreerF ops a b where
PureF :: a -> FreerF ops a b
FreeF
:: forall ops a b x
. CoOperation ops... |
d282a09ea1b99667b34e44a7e49875694ad6bc484ce72e5c064d414fad64a490 | ocsigen/ocsimore | user.ml | Ocsimore
* Copyright ( C ) 2005
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/core/server/user.ml | ocaml | We might want to simply overwrite incorrect values by the correct ones
dynamic groups:
the user does not exist
XXX Should remove check that we do not remove from a dyn group
This is a dynamic group that contains the currently logged user.
It is almost entirely equivalent to a group that contains all the use... | Ocsimore
* Copyright ( C ) 2005
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
... |
8b0f9d12aedf034cdb146bb710fe678886aeb0adaf8a0aaf871feb1cf8692e2a | gregtatcam/imaplet-lwt | imaplet_dns.mli |
* Copyright ( c ) 2013 - 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/commands/imaplet_dns.mli | ocaml | domain name -> list of ip's
ip -> list of ip's
resolve mx : domain name -> (priority * ip list) list |
* Copyright ( c ) 2013 - 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
377f515fef0c026eb93b87f182535db8288be36280063190717ed96417adc7c0 | spechub/Hets | runTest.hs | import System.Environment
import System.Exit (exitFailure)
import Control.Monad (forM_)
import Data.List (uncons, stripPrefix)
import Common.Parsec()
import Common.GlobalAnnotations(emptyGlobalAnnos)
import Text.ParserCombinators.Parsec
import OWL2.AS
import OWL2.Sign (emptySign)
import OWL2.XML
import OWL2.XMLConve... | null | https://raw.githubusercontent.com/spechub/Hets/c27bd92f22f3b92e792eff0adaa3baec9d61c2b1/OWL2/scripts/runTest.hs | haskell | import System.Environment
import System.Exit (exitFailure)
import Control.Monad (forM_)
import Data.List (uncons, stripPrefix)
import Common.Parsec()
import Common.GlobalAnnotations(emptyGlobalAnnos)
import Text.ParserCombinators.Parsec
import OWL2.AS
import OWL2.Sign (emptySign)
import OWL2.XML
import OWL2.XMLConve... | |
af0ea4f1360e6ce9df2833b9e4edd4f6394381ee282f126819eae5b09866569a | ultralisp/ultralisp | dist.lisp | (defpackage #:ultralisp/models/dist
(:use #:cl)
(:import-from #:ultralisp/models/versioned
#:versioned
#:object-version)
(:import-from #:ultralisp/models/source)
(:import-from #:ultralisp/protocols/url
#:url)
(:import-from #:alexandria
#:make-key... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/6b0f8e10037c5f87eed4046822af9c945f3c0188/src/models/dist.lisp | lisp | Initial state, in this state new versions of
project sources can be associated with a dist:
In this state no new sources can be attached
to the dist and it's quicklisp-version
is already generated. Now it just waits for
metadata generation:
at the moment when state becomes :ready, built-at
slot gets filled:
I... | (defpackage #:ultralisp/models/dist
(:use #:cl)
(:import-from #:ultralisp/models/versioned
#:versioned
#:object-version)
(:import-from #:ultralisp/models/source)
(:import-from #:ultralisp/protocols/url
#:url)
(:import-from #:alexandria
#:make-key... |
5af7d0d1aa10bebaebc7f4442d3ceab0575f8e9415bc653a8a43623e785c533f | maranget/hevea | saver.mli | module type Config = sig
type t
val of_string : string -> t
val of_out : Out.t -> t
end
module type S = sig
type out
val opt : Lexing.lexbuf -> out
val arg : Lexing.lexbuf -> out
val arg2 : Lexing.lexbuf -> out
end
module Make(C:Config) : S with type out = C.t
module String : S with type out = strin... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/saver.mli | ocaml | module type Config = sig
type t
val of_string : string -> t
val of_out : Out.t -> t
end
module type S = sig
type out
val opt : Lexing.lexbuf -> out
val arg : Lexing.lexbuf -> out
val arg2 : Lexing.lexbuf -> out
end
module Make(C:Config) : S with type out = C.t
module String : S with type out = strin... | |
c1d8b9925bae6e91b56f2b98806640d699a4fdb29459511034bdb17b29f64d10 | calyau/maxima | cobyla-interface.lisp | ;;; -*- Mode: lisp -*-
Simple Maxima interface to COBYLA , Constrained Optimization BY
;;; Linear Approximations.
(in-package #-gcl #:maxima #+gcl "MAXIMA")
;; Variable that will hold the function that calculates the function
;; value and the constraints.
(defvar *calcfc*)
COBYLA always calls CALCFC to compute ... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/cobyla/cobyla-interface.lisp | lisp | -*- Mode: lisp -*-
Linear Approximations.
Variable that will hold the function that calculates the function
value and the constraints.
constraint equations. But we want to be able to specify different
do the real compuation.
Go through constraints and convert f >= g to f - g, f <= g to g -
Compute the functi... |
Simple Maxima interface to COBYLA , Constrained Optimization BY
(in-package #-gcl #:maxima #+gcl "MAXIMA")
(defvar *calcfc*)
COBYLA always calls CALCFC to compute the function value and the
versions . So , COBYLA calls CALCFC , which then calls * CALCFC * to
(defun cobyla::calcfc (n m x f con)
(declare (i... |
f377a2641662eba7dec0e294932808d04dcb5de8fc5116d98060af8dd328896e | shentufoundation/deepsea | Ctypes.ml | open AST
open BinInt
open BinNums
open Datatypes
open Monad
open OptionMonad
open Specif
type signedness =
| Signed
| Unsigned
type intsize =
| I8
| I16
| I32
| I256
| IBool
type ptrkind =
| Coq_mem
| Coq_stor
| Coq_call
type coq_type =
| Tvoid
| Tint of intsize * signedness
| Tpointer of ptrkind * coq_type
| Tarra... | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Ctypes.ml | ocaml | * val sizeof_words : coq_type -> coq_Z *
* val sizeof_struct_words : fieldlist -> coq_Z -> coq_Z * | open AST
open BinInt
open BinNums
open Datatypes
open Monad
open OptionMonad
open Specif
type signedness =
| Signed
| Unsigned
type intsize =
| I8
| I16
| I32
| I256
| IBool
type ptrkind =
| Coq_mem
| Coq_stor
| Coq_call
type coq_type =
| Tvoid
| Tint of intsize * signedness
| Tpointer of ptrkind * coq_type
| Tarra... |
a2d59d183b417efaed43e71c667aaacb132c6f7930400da097c68fa73de8af55 | herd/herdtools7 | location.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/de351f794ab8629ec9d589a216e2e4896ec5a6aa/lib/location.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
a03a72b58b7ac393ce998f5562bff1c9a232b3ae06500b46cbad75c576a62d65 | eliaslfox/language-elm | Type.hs | {-# OPTIONS_HADDOCK prune #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Ast for declaring types
module Elm.Type (TypeDec(..)) where
import Control.Monad.Writer (tell)
import Data.List (intersperse)
import Data.Maybe
import Data.String
import Elm.Classes
impor... | null | https://raw.githubusercontent.com/eliaslfox/language-elm/df39d2fc4d14f3d4431411ca5eb030a887c4eb6b/src/Elm/Type.hs | haskell | # OPTIONS_HADDOCK prune #
# LANGUAGE OverloadedStrings #
| Ast for declaring types
| Data type to represent types
| A type with type paramaters
| A function type
| A tuple type
| A record type |
module Elm.Type (TypeDec(..)) where
import Control.Monad.Writer (tell)
import Data.List (intersperse)
import Data.Maybe
import Data.String
import Elm.Classes
import Elm.Expression
import Elm.GenError
import Text.PrettyPrint
da... |
bb64d91d089a37a6b134a2396a6af13af68e6182b1643aa4b6d89753ade2d5de | MLstate/opalang | bslLib.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libbsl/bslLib.ml | ocaml | dependencies, refactoring
ast shorthand
interfaces
alias
debug
template
let _ =
#<If:BSL_VERBOSE $minlevel 1>
debug "do some %s of level %d@\n" "debug" 1
#<End>
in
See the documentation in the interface and the manual
IMPLEMENTATION OF BSL
Bypass visibility. CF documentation
... |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
d41e9a789f24a6af5d018fd976e804476b705ac24410b4e0c263eb4ff3e4d120 | Gabriella439/Haskell-Pipes-Extras-Library | Extras.hs | {-# LANGUAGE RankNTypes #-}
-- | Unassorted utilities for @pipes@
module Pipes.Extras (
-- * ArrowChoice
arr
, left
, right
, (+++)
, select
-- * Lenses
, input
, output
, select'
-- * Fun
, check
, delay
, progress
* Compatibility
-- $foldl
, fo... | null | https://raw.githubusercontent.com/Gabriella439/Haskell-Pipes-Extras-Library/6315888a05bd8d7af8e9b36323c534586fccd81b/src/Pipes/Extras.hs | haskell | # LANGUAGE RankNTypes #
| Unassorted utilities for @pipes@
* ArrowChoice
* Lenses
* Fun
$foldl
* Fold Variations
$variations
* Church encodings
| Feed some values into a pipe and let the rest pass by
| Like 'select', but use a 'Prism' (like '_Left') to decide what to process
| Strict fold of the elements of ... |
module Pipes.Extras (
arr
, left
, right
, (+++)
, select
, input
, output
, select'
, check
, delay
, progress
* Compatibility
, fold
, foldM
, scan
, scanM
, scan1
, scan1M
, scan1i
, scan1iM
, toProxy
, fromProxy
) wh... |
543339a28c2f5c123d46f6a9bf8ad4044d30ad00f2c9d739fc75563abf9fc0cb | swtwsk/vinci-lang | DecorateOffsets.hs | # LANGUAGE LambdaCase #
module SPIRV.DecorateOffsets (decorateOffsets) where
import Control.Monad.RWS
import Data.Bifunctor (second)
import Data.DList (DList, toList)
import Data.Functor ((<&>))
import Data.Maybe (catMaybes)
import qualified Data.Map as Map
import StructDefMap (StructDefMap)
import SPIRV.SpirOps
impo... | null | https://raw.githubusercontent.com/swtwsk/vinci-lang/9c7e01953e0b1cf135af7188e0c71fe6195bdfa1/src/SPIRV/DecorateOffsets.hs | haskell | size, alignment | # LANGUAGE LambdaCase #
module SPIRV.DecorateOffsets (decorateOffsets) where
import Control.Monad.RWS
import Data.Bifunctor (second)
import Data.DList (DList, toList)
import Data.Functor ((<&>))
import Data.Maybe (catMaybes)
import qualified Data.Map as Map
import StructDefMap (StructDefMap)
import SPIRV.SpirOps
impo... |
c938bdc323332a3e4c4d248559d571026f87a1e9346e20ef5d3faeeae2354d78 | fukamachi/dexador | dexador.lisp | (in-package :cl-user)
(defpackage dexador-test
(:use :cl
:rove)
(:import-from :clack.test
:*clack-test-port*
:*clack-test-access-port*
:port-available-p
:localhost))
(in-package :dexador-test)
(defun random-port ()
"Return a port number not ... | null | https://raw.githubusercontent.com/fukamachi/dexador/2b38e7e0770ca0da29bffa426beca489c5b07256/t/dexador.lisp | lisp | but we need to change it in some tests
proxy behavior is same as direct connection if http
mixi.jp
sourceforge
decoding stream
binary stream
decoding stream
no Content-Length and no Transfer-Encoding
Test if the JSON encoding
was returned to the pool.
Previously, because of the another bug, other error was s... | (in-package :cl-user)
(defpackage dexador-test
(:use :cl
:rove)
(:import-from :clack.test
:*clack-test-port*
:*clack-test-access-port*
:port-available-p
:localhost))
(in-package :dexador-test)
(defun random-port ()
"Return a port number not ... |
73afd08bbf44d5eec2f19400c151473601956174e5944fcbf2ea7deb4e9f11b0 | bsansouci/bsb-native | split.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/asmcomp/split.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Reg
open Mach
type subst = Reg.... |
a8788b2062a86a7d142c6510d5e75586910dd7839948a11e0d7c0622737d9493 | ladderlife/om-css | dom.cljc | (ns om-css.dom
(:refer-clojure :exclude [map meta time mask use])
#?(:cljs (:require-macros [om-css.dom :refer [gen-tag-fns]]))
(:require #?(:clj [cellophane.dom :as dom]
:cljs [om.dom :as dom])
[clojure.string :as string]
[om-css.utils :as utils #?@(:clj [:refer [if-cljs]]... | null | https://raw.githubusercontent.com/ladderlife/om-css/54190d24f385d8e32057a2f5ed3f89e87f3eacdb/src/main/om_css/dom.cljc | clojure | generate all form tags
cellophane has these tags
:omcss$info might end up in classes because we're naively
adding it to a map that appears in props. A stronger
solution might be to check if such map contains the :class keyword
proxy thru to om.dom | (ns om-css.dom
(:refer-clojure :exclude [map meta time mask use])
#?(:cljs (:require-macros [om-css.dom :refer [gen-tag-fns]]))
(:require #?(:clj [cellophane.dom :as dom]
:cljs [om.dom :as dom])
[clojure.string :as string]
[om-css.utils :as utils #?@(:clj [:refer [if-cljs]]... |
2d43bc533ec2f75628b123d06229bdb9e9ab86cae94902a865aed06bf1e0e44b | lemmaandrew/CodingBatHaskell | withoutString.hs | From
Given two strings , base and remove , return a version of the base string where all
instances of the remove string have been removed ( not case sensitive ) . You may assume that
the remove string is length 1 or more . Remove only non - overlapping instances , so with
\"xxx\ " removing \"xx\ " leaves \"x... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-3/withoutString.hs | haskell | From
Given two strings , base and remove , return a version of the base string where all
instances of the remove string have been removed ( not case sensitive ) . You may assume that
the remove string is length 1 or more . Remove only non - overlapping instances , so with
\"xxx\ " removing \"xx\ " leaves \"x... | |
381c0e086bd3099cf221478357d94741cadaf4ff3a1f78584a587362755452f3 | deech/fltkhs-demos | threads.hs | {-# LANGUAGE OverloadedStrings #-}
-- This example shows how to run a CPU-intensive thread in the
background while keeping the UI responsive . All FLTK calls are
-- done on the main thread.
--
-- Press the "start background thread" button to start the
-- CPU-intensive thread. Then observe that clicking the "increm... | null | https://raw.githubusercontent.com/deech/fltkhs-demos/64ed6dfd281d309535ea94d6396c0260395b37d0/src/Examples/threads.hs | haskell | # LANGUAGE OverloadedStrings #
This example shows how to run a CPU-intensive thread in the
done on the main thread.
Press the "start background thread" button to start the
CPU-intensive thread. Then observe that clicking the "increment"
button remains responsive.
Set up the window and widgets.
The communicatio... | background while keeping the UI responsive . All FLTK calls are
module Main where
import qualified Graphics.UI.FLTK.LowLevel.FL as FL
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.FLTKHS
import Control.Concurrent
import Control.Concurrent.STM
import Control.Exception (evaluate)
impor... |
42eb7690e38a3a261b363f94ced03538b3b11a5e864520661138f1472e32a7d3 | yetibot/yetibot | base64.clj | (ns yetibot.test.commands.base64
(:require
[midje.sweet :refer [fact => truthy]]
[yetibot.commands.base64 :refer :all]
[clojure.data.codec.base64 :as b64]))
(fact test-encode-no-padding
(String. (b64/encode (.getBytes "any carnal pleasur"))) => "YW55IGNhcm5hbCBwbGVhc3Vy")
(fact test-encode-paddin... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/test/yetibot/test/commands/base64.clj | clojure | (ns yetibot.test.commands.base64
(:require
[midje.sweet :refer [fact => truthy]]
[yetibot.commands.base64 :refer :all]
[clojure.data.codec.base64 :as b64]))
(fact test-encode-no-padding
(String. (b64/encode (.getBytes "any carnal pleasur"))) => "YW55IGNhcm5hbCBwbGVhc3Vy")
(fact test-encode-paddin... | |
354be8ff9895abc9ea2650c4d5ae49c051387333ae12e01a7c243f3b36a5d92c | LaifsV1/YUP | StringFormats.ml | (* String formats for printing proofs and errors *)
author :
open AbstractSyntax
open Format
open Lexing
exception SyntaxError of string * pos_range
exception ParseError of string * pos_range
(***********************************)
(*** FORMATED STRING FROM INPUTS ***)
(***********************************)
let l... | null | https://raw.githubusercontent.com/LaifsV1/YUP/480d8d6228092ec8e7881fde071bd65be703b4f1/src/StringFormats.ml | ocaml | String formats for printing proofs and errors
*********************************
** FORMATED STRING FROM INPUTS **
*********************************
all proof sprintf formatted functions
**NOT IN USE**
**NOT IN USE**
*************************
** TO STRING FUNCTIONS **
*************************
********************
** ... | author :
open AbstractSyntax
open Format
open Lexing
exception SyntaxError of string * pos_range
exception ParseError of string * pos_range
let line_sprintf p1 p2 = sprintf "(line %d , col %d) to (line %d , col %d)"
(p1.pos_lnum) (p1.pos_cnum - p1.pos_bol) (p2.pos_lnum) (p2.pos_cnum... |
4f021454083a3b12a5418cce9bb8f4e31d060b19aa7ce1ed9585553e35c217d5 | joergen7/effi | effi_awk.erl | %% -*- erlang -*-
%%
%% Effi: Erlang foreign function interface
%%
Copyright 2015 - 2019 < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required ... | null | https://raw.githubusercontent.com/joergen7/effi/aac0d5716c322200dd1145cf6bb651f79834bfd5/src/effi_awk.erl | erlang | -*- erlang -*-
Effi: Erlang foreign function interface
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.... | Copyright 2015 - 2019 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2015 - 2019
-module( effi_awk ).
-behaviour( effi ).
-export( [bind_singleton_boolean/2,
bind_singleton_string/2,
... |
666e7aac709d8177a333fbf0c56ba6e3d527ed22980e68359bdf7f88e3bd24d3 | hnc-agency/shq | prop_shq.erl | Copyright ( c ) 2022 , < >
Copyright ( c ) 2022 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/hnc-agency/shq/fd2a998dae43025a80f559e92bc5ea9a2e619874/test/prop_shq.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2022 , < >
Copyright ( c ) 2022 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(prop_shq).
-include... |
1ca26bf4acdd06c9c7e8393770416016f66ae2fc6b9a7737e728efec0ce91e5f | xldenis/MGC | ExpressionSpec.hs | module MGC.Parser.ExpressionSpec (spec) where
import Test.Hspec
import MGC.Expectation
import MGC.Parser.Expression
import Text.Parsec
import MGC.Syntax
spec :: Spec
spec = do
describe "expression" $ do
it "parses arithmetic expression" $ do
expression `parses` "0==0" ~> (BinaryOp () Eq... | null | https://raw.githubusercontent.com/xldenis/MGC/caeb2d72d16fbbefeb5104d7133c537fea66ba21/test/MGC/Parser/ExpressionSpec.hs | haskell | module MGC.Parser.ExpressionSpec (spec) where
import Test.Hspec
import MGC.Expectation
import MGC.Parser.Expression
import Text.Parsec
import MGC.Syntax
spec :: Spec
spec = do
describe "expression" $ do
it "parses arithmetic expression" $ do
expression `parses` "0==0" ~> (BinaryOp () Eq... | |
680408eee25dfd38702b56e73c3de1613d5cfc9f4dd4071611cf53474d24f5f9 | avik-das/garlic | require-star-using-original-name.scm | (require "../aux/auxillary-module" *)
(define (auxillary-function x)
(display "local auxillary-function: ")
(display x)
(newline))
(auxillary-function "hello")
(auxillary-module:auxillary-function "hello")
| null | https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/success/require-star-using-original-name.scm | scheme | (require "../aux/auxillary-module" *)
(define (auxillary-function x)
(display "local auxillary-function: ")
(display x)
(newline))
(auxillary-function "hello")
(auxillary-module:auxillary-function "hello")
| |
b61d1c644f61ae56b559c0a1193f1644cb1c6163b4f560dc4adc67da66e855e3 | dizengrong/erlang_game | lager_test_backend.erl | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required... | null | https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/deps/lager/test/lager_test_backend.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
are we R15 or greater
elegibl... | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
67cb9adef22cc3048e0ef2647f6575c707641bd4a031dcc3af6d0530228c6a5c | silkapp/rest | Haskell.hs | # LANGUAGE
CPP
, DoAndIfThenElse
, LambdaCase
, PatternGuards
, TemplateHaskell
, ViewPatterns
#
CPP
, DoAndIfThenElse
, LambdaCase
, PatternGuards
, TemplateHaskell
, ViewPatterns
#-}
module Rest.Gen.Haskell
( HaskellContext (..)
, mkHsApi
) where
import Control.App... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-gen/src/Rest/Gen/Haskell.hs | haskell | Pattern match with data constructor
want to make assumptions about the response type if there is no
accept header so in that case we force it to be JSON. | # LANGUAGE
CPP
, DoAndIfThenElse
, LambdaCase
, PatternGuards
, TemplateHaskell
, ViewPatterns
#
CPP
, DoAndIfThenElse
, LambdaCase
, PatternGuards
, TemplateHaskell
, ViewPatterns
#-}
module Rest.Gen.Haskell
( HaskellContext (..)
, mkHsApi
) where
import Control.App... |
097b3d88639b654b1bef524c295fd6e27789be6fcff61ad50d1e7f030a45580f | yitzchak/shasht | bench.lisp | (ql:quickload '(:cl-json :jonathan :json-streams :jsown :shasht :st-json :yason :cl-spark :the-cost-of-nothing))
(defparameter +json-string+ "{\"key1\": \"value\\n\",
\"key2\":1,\"key3\" :[\"Hello \\u2604\", 1.2e-34 ,true,
false,null]}")
(defun cl-json/r ()
"cl-json"
(cl-json:decode-json-from-string +json-stri... | null | https://raw.githubusercontent.com/yitzchak/shasht/4055327ef8e2aaa8627892ab256350ff3cb15e3c/tests/bench.lisp | lisp | (ql:quickload '(:cl-json :jonathan :json-streams :jsown :shasht :st-json :yason :cl-spark :the-cost-of-nothing))
(defparameter +json-string+ "{\"key1\": \"value\\n\",
\"key2\":1,\"key3\" :[\"Hello \\u2604\", 1.2e-34 ,true,
false,null]}")
(defun cl-json/r ()
"cl-json"
(cl-json:decode-json-from-string +json-stri... | |
fd27c9091a1abcbd5a13c0a8d89219cc06a4328c707e5c96650da9ec4fc29815 | fmw/vix | auth.clj | ;; src/vix/auth.clj: authentication and authorization functionality.
Copyright 2011 - 2012 , Vixu.com , F.M. ( Filip ) de Waard < > .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License ... | null | https://raw.githubusercontent.com/fmw/vix/112a45d6e376f099ad0a3f5bff9cc07511f2ff5e/src/clj/vix/auth.clj | clojure | src/vix/auth.clj: authentication and authorization functionality.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or im... | Copyright 2011 - 2012 , Vixu.com , F.M. ( Filip ) de Waard < > .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns vix.auth
(:require [com.ashafa.clutch :as clutch]
[vix.db :as db])
(:use [slingshot.slingshot :only [throw+ try+]])
(:import (org.mindrot.jbcrypt BCrypt)))
(... |
e6eb9afd8204d0fa78ba6e80755f2ef830b79005a856da9cd794bfb0407dc6cf | souenzzo/eql-as | specs.cljc | (ns br.com.souenzzo.eql-as.specs
(:require [clojure.spec.alpha :as s]
[br.com.souenzzo.eql-as.alpha :as eql-as]))
(s/def ::eql-as/ident
(s/or :key any?
:ref (s/tuple any? ::eql-as/as-map)))
(s/def ::eql-as/as-map
(s/coll-of (s/tuple any? ::eql-as/ident)))
(s/def ::eql-as/as-key any?)
(s/fd... | null | https://raw.githubusercontent.com/souenzzo/eql-as/d33de8d1b4428d99c25e0d95b008fe4e3e842f24/src/main/br/com/souenzzo/eql_as/specs.cljc | clojure | (ns br.com.souenzzo.eql-as.specs
(:require [clojure.spec.alpha :as s]
[br.com.souenzzo.eql-as.alpha :as eql-as]))
(s/def ::eql-as/ident
(s/or :key any?
:ref (s/tuple any? ::eql-as/as-map)))
(s/def ::eql-as/as-map
(s/coll-of (s/tuple any? ::eql-as/ident)))
(s/def ::eql-as/as-key any?)
(s/fd... | |
f271e17aa446b297fb6a0885d8465d115ad334308b2c1181ce28281c7f1febdc | acieroid/scala-am | factInp-2.scm | (letrec ((fact (lambda (n)
(if (= n 0)
1
(* n (fact (- n 1)))))))
(fact 8))
| null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/factInp-2.scm | scheme | (letrec ((fact (lambda (n)
(if (= n 0)
1
(* n (fact (- n 1)))))))
(fact 8))
| |
0d0f5a137842dfb5cac03fa94bbf078033b011540520b9174fb1bb40886e8fd0 | borkdude/speculative | coal_mine_generator.clj | (ns speculative.coal-mine-generator
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.cli :refer [parse-opts]]
[coal-mine.script :as cm]))
(def problem-numbers (set cm/problem-numbers))
(defn ns-form [problems ret-specs?]
(format "(ns speculative.coal-mine-runner
(:require %s
... | null | https://raw.githubusercontent.com/borkdude/speculative/4e773794a4065a84bdadd997516e52c76ab51b1f/test/speculative/coal_mine_generator.clj | clojure | (ns speculative.coal-mine-generator
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.cli :refer [parse-opts]]
[coal-mine.script :as cm]))
(def problem-numbers (set cm/problem-numbers))
(defn ns-form [problems ret-specs?]
(format "(ns speculative.coal-mine-runner
(:require %s
... | |
dcb3a42b3ef63c5cd5a001b1beff373b065ba5e984453c489df0de91b29b4d2e | well-typed/large-records | R060.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
# LANGUAGE UndecidableInstances #
{-# OPTIONS_GHC -fplugi... | null | https://raw.githubusercontent.com/well-typed/large-records/fb983aa136c2602499c2421323bd52b6a54b7c9a/large-records-benchmarks/bench/before/Before/Sized/R060.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fplugin=RecordDotPreprocessor #
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Before.Sized.R060 where
import Data.Aeson
import Generics.SOP.JSON
import Ge... |
cce819398a7cd64ed84af532325c83cff5cf8250cc0e59b56769277f1c8e628d | ulricha/dsh | Common.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE PatternSynonyms #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
module Database.DSH.SL.Opt.Rewrite.Common where
import qualified Data.IntMap as M
import Control.Monad
import Database.Algebra.Dag.Common
import ... | null | https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/SL/Opt/Rewrite/Common.hs | haskell | Type abbreviations for convenience
-------------------------------------------------------------------------------
Rewrite helper functions | # LANGUAGE TemplateHaskell #
# LANGUAGE PatternSynonyms #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
module Database.DSH.SL.Opt.Rewrite.Common where
import qualified Data.IntMap as M
import Control.Monad
import Database.Algebra.Dag.Common
import ... |
601faccdc3406010d7a6381e9f79506f6531b15efa3d81390de964ef733ec49d | tek/ribosome | Id.hs | module Ribosome.Host.Interpreter.Id where
import Conc (interpretAtomic)
import Polysemy.Input (Input (Input))
|Interpret ' Input ' by incrementing a numeric type starting from @1@.
interpretInputNum ::
∀ a r .
Num a =>
Member (Embed IO) r =>
InterpreterFor (Input a) r
interpretInputNum =
interpretAtomic @... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/host/lib/Ribosome/Host/Interpreter/Id.hs | haskell | module Ribosome.Host.Interpreter.Id where
import Conc (interpretAtomic)
import Polysemy.Input (Input (Input))
|Interpret ' Input ' by incrementing a numeric type starting from @1@.
interpretInputNum ::
∀ a r .
Num a =>
Member (Embed IO) r =>
InterpreterFor (Input a) r
interpretInputNum =
interpretAtomic @... | |
18d1bc969a5c31a0bbfda631498112dafe0c1f1c727e9488211d4e2dc8eb0818 | coco33920/ocaml-baguettesharp-interpreter | functions.ml | (**The Function Module : Handles called function and dispatch commands*)
* The main for variable storage
let main_ram = Hashtbl.create 1000
let result = Stack.create ()
(**Replaces all occurence of a string by another*)
let rec boucle regex str list =
match list with
| [] -> str
| Parser.Argument (Parser.Str ... | null | https://raw.githubusercontent.com/coco33920/ocaml-baguettesharp-interpreter/13db7b3e1b40f321b970699c4725bc9ac917ec72/src/functions/functions.ml | ocaml | *The Function Module : Handles called function and dispatch commands
*Replaces all occurence of a string by another
*Recursively prints the list of argument
*Printf the input
*Creates a new variable into the ram
*Access to a variable stored in the ram
*Reads the standard input
*Takes a string and a list of argument and... |
* The main for variable storage
let main_ram = Hashtbl.create 1000
let result = Stack.create ()
let rec boucle regex str list =
match list with
| [] -> str
| Parser.Argument (Parser.Str s) :: q ->
let nstr = Str.replace_first regex s str in
boucle regex nstr q
| Parser.Argument (Parser.I i) :: q... |
44a4c29c6e418b951b453a5f2ee9dc8dd8f98c1bb60043a38edb6881a12aa67c | xapi-project/stdext | threadext.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/stdext/690d233cf37c4e523e17e9b5ed74a118804bc9f5/lib/xapi-stdext-threads/threadext.ml | ocaml | * execute the function f with the mutex hold
* Parallel List.iter. Remembers all exceptions and returns an association list mapping input x to an exception.
Applications of x which succeed will be missing from the returned list.
Concrete type is the ends of a pipe
A pipe is used to wake up a thread blocked in ... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
ae07ba2be4c9bce1009130be6b5ee2ae7a95a93dec867f9c67d3b9549d220970 | disconcision/fructure | fructure-language.rkt | #lang racket
(provide L1
sort-name?
terminal-name?
form-name?
affo-name?)
; sorts
(define L1-sort-names '(expr
name
hole
free))
; terminal sorts
(define L1-terminal-names '(name
na... | null | https://raw.githubusercontent.com/disconcision/fructure/d434086052eab3c450f631b7b14dcbf9358f45b7/archive/fructure.0.2/fructure-language.rkt | racket | sorts
terminal sorts
form identifiers (reserved words)
grammar
(free (|| (free ...)))
snaffos: syntactic affordances for interface metalanguage
membership predicates | #lang racket
(provide L1
sort-name?
terminal-name?
form-name?
affo-name?)
(define L1-sort-names '(expr
name
hole
free))
(define L1-terminal-names '(name
name-new
... |
51315199244032efad7ad1e3e55b1b70fd66165a021e71d6a7ddec6270d4fb25 | mbj/mhs | Container.hs | module DBT.Postgresql.Container
( defaultBuildDefinition
, populateDatabase
, populateDatabaseBuildDefinition
, populateDatabaseBuildDefinitionDefault
, populateDatabaseBuildDefinitionIfAbsent
, withDatabaseContainer
, withDatabaseContainerDefault
, withDatabaseContainerImage
, withDatabaseContainerPr... | null | https://raw.githubusercontent.com/mbj/mhs/6d4bfab73d7d0ea59203656080b0f9d389f823e9/dbt-postgresql-container/src/DBT/Postgresql/Container.hs | haskell | 100ms
connections from outside the container
no unix socket | module DBT.Postgresql.Container
( defaultBuildDefinition
, populateDatabase
, populateDatabaseBuildDefinition
, populateDatabaseBuildDefinitionDefault
, populateDatabaseBuildDefinitionIfAbsent
, withDatabaseContainer
, withDatabaseContainerDefault
, withDatabaseContainerImage
, withDatabaseContainerPr... |
ede6357f2d7ffb6d2f228c7f599f68bf949a4bf7de1a0ffb6f12ed96812a2239 | racket/readline | info.rkt | #lang info
(define collection 'multi)
(define deps '(["base" #:version "8.0.0.4"]))
(define pkg-desc "implementation (no documentation) part of \"readline\"")
(define pkg-authors '(mflatt))
(define version "1.1")
(define license
'(Apache-2.0 OR MIT))
| null | https://raw.githubusercontent.com/racket/readline/df55a811d57d6677959fde479106bc43b99d6bdd/readline-lib/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '(["base" #:version "8.0.0.4"]))
(define pkg-desc "implementation (no documentation) part of \"readline\"")
(define pkg-authors '(mflatt))
(define version "1.1")
(define license
'(Apache-2.0 OR MIT))
| |
99ffd2a47e5cccb3c3c2cdf256ebfffdae249cf7776f9eedebb634ca0c0eda57 | qriollo/qriollo | TestOptim.hs |
-- Este archivo es parte de Qriollo.
Qriollo is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
Qriollo is distributed in the... | null | https://raw.githubusercontent.com/qriollo/qriollo/b45ba0f4e9d444f786217ff931d7ecf74bfddbe4/src/Test/TestOptim.hs | haskell | Este archivo es parte de Qriollo.
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Single use of a function
Not optimized: function occurring as a variabl... |
Qriollo is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
Qriollo is distributed in the hope that it will be useful ,
You should have received a copy of the GNU Gen... |
228ddd2d7b1f82e5e01ff7e575a5fabef96b6c242d63429aa8974234fbc10742 | d-cent/mooncake | user.clj | (ns mooncake.db.user
(:require [mooncake.db.mongo :as mongo]))
(def collection "user")
(defn create-user! [store auth-provider-user-id username]
(let [user {:auth-provider-user-id auth-provider-user-id
:username username}]
(mongo/store-with-id! store collection :auth-provider-user-id user)))
(d... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src/mooncake/db/user.clj | clojure | (ns mooncake.db.user
(:require [mooncake.db.mongo :as mongo]))
(def collection "user")
(defn create-user! [store auth-provider-user-id username]
(let [user {:auth-provider-user-id auth-provider-user-id
:username username}]
(mongo/store-with-id! store collection :auth-provider-user-id user)))
(d... | |
b5e98262341d0dd5b2d648dd637b23fcf5fe76412d2d88933d2ffbc8c596533e | hengestone/scuttleberl | identity.erl | Copyright ( C ) 2019 < >
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
%% License, or (at your option) any later version.
%%
%% This program is distrib... | null | https://raw.githubusercontent.com/hengestone/scuttleberl/5ca3969522fcde48977d7388cef27f20f316c079/src/models/identity.erl | erlang |
This program is free software: you can redistribute it and/or modify
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Af... | Copyright ( C ) 2019 < >
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU Affero General Public License
-module(identity).
-include("ssb.hrl").
-export([create/2, store/1, invite/2, ... |
e162ef6a4427a96d532da1d451a6a620eb20f9b36f11c2a191788ad256d6f3a1 | swtwsk/vinci-lang | Interpreter.hs | module Core.Interpreter (eval, evalExpr, evalExprEnv, Value(..)) where
import Control.Monad.Reader
import Control.Monad.Except
import Data.Bifunctor (first)
import Data.List (intercalate)
import qualified Data.Map as Map
import Core.AST
import Core.Ops
type Err = String
type Env = Map.Map String Value
type EvalM = R... | null | https://raw.githubusercontent.com/swtwsk/vinci-lang/9c7e01953e0b1cf135af7188e0c71fe6195bdfa1/src/Core/Interpreter.hs | haskell | TODO: FIX INTERPRETER (ACCOUNT FOR STRUCTS!)
e' <- eval' e
-- fields <-
let (VStruct s vals) = e'
return $ vals !! i
SHOW | module Core.Interpreter (eval, evalExpr, evalExprEnv, Value(..)) where
import Control.Monad.Reader
import Control.Monad.Except
import Data.Bifunctor (first)
import Data.List (intercalate)
import qualified Data.Map as Map
import Core.AST
import Core.Ops
type Err = String
type Env = Map.Map String Value
type EvalM = R... |
e33b21773f7cd544a7c1ce3640d06402d164b40639cbb7bb41c1d390727b394c | yminsky/incremental-tutorial | main.ml | open! Core
open! Import
let () =
Command.group
~summary:"Command line API"
[ "server", Server.command
; "ex1", Ex1.command
; "ex2", Ex2.command
; "ex3", Ex3.command
; "ex4", Ex4.command
; "ex5", Ex5.command
; "ex6", Ex6.command
]
|> Command.run
| null | https://raw.githubusercontent.com/yminsky/incremental-tutorial/756dfe36ec1b0a102128b3fa78a6c6762bdab90a/solutions/main.ml | ocaml | open! Core
open! Import
let () =
Command.group
~summary:"Command line API"
[ "server", Server.command
; "ex1", Ex1.command
; "ex2", Ex2.command
; "ex3", Ex3.command
; "ex4", Ex4.command
; "ex5", Ex5.command
; "ex6", Ex6.command
]
|> Command.run
| |
a1ebe373115de850c386c8aa579493e76c476b68bd6e533b18e2d084b2a7611c | philnguyen/soft-contract | prims-04-07.rkt | #lang typed/racket/base
(require racket/match
racket/contract
racket/bool
racket/string
racket/math
racket/list
racket/stream
racket/dict
racket/function
racket/set
racket/flonum
racket/fixnum
racket/generator
... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/primitives/prims-04-07.rkt | racket |
FIXME listof
FIXME listof
(cons/c (cons/c exact-nonnegative-integer?
FIXME listof
FIXME listof
(cons/c (cons/c exact-nonnegative-integer?
FIXME listof
(list/c (or/c string? bytes regexp? byte-regexp?) | #lang typed/racket/base
(require racket/match
racket/contract
racket/bool
racket/string
racket/math
racket/list
racket/stream
racket/dict
racket/function
racket/set
racket/flonum
racket/fixnum
racket/generator
... |
e1084617694235593e2803cf3d3171b80033901a39c9f8949def5a5dfd67c686 | webnf/webnf | project.clj | (defproject webnf/cats "0.1.19-SNAPSHOT"
:description "Categories based on continuations"
:plugins [[lein-modules "0.3.11"]]
:dependencies [[org.clojure/clojure "_" :upgrade false]
[webnf/base "_" :upgrade false]])
| null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/cats/project.clj | clojure | (defproject webnf/cats "0.1.19-SNAPSHOT"
:description "Categories based on continuations"
:plugins [[lein-modules "0.3.11"]]
:dependencies [[org.clojure/clojure "_" :upgrade false]
[webnf/base "_" :upgrade false]])
| |
b39a3cfde389e7e28c206cdfe6c88902beb91fc2cd57c9c5d2065cc98102beae | didibus/clj-ddd-example | domain_model.clj | (ns clj-ddd-example.domain-model
"Our Domain Model lives here. In DDD, a domain model is the set of domain
concepts modeled as data in a particular structure along with their
invariants, i.e., the set of consistency rules that describes each valid state
for each concept in the domain.
In our example, we're ... | null | https://raw.githubusercontent.com/didibus/clj-ddd-example/e99aa7b7013529e669ce06d400765ddd10b7214f/src/clj_ddd_example/domain_model.clj | clojure |
; ;
; ;
Amount ;;;
Amount ;;;
Balance ;;;
Balance ;;;
Account ;;;
Account ;;;
Debit ;;;
Debit ;;;
; ;
; ;
Transfer ;;;
Transfer ;;;
| (ns clj-ddd-example.domain-model
"Our Domain Model lives here. In DDD, a domain model is the set of domain
concepts modeled as data in a particular structure along with their
invariants, i.e., the set of consistency rules that describes each valid state
for each concept in the domain.
In our example, we're ... |
b4ca64612676898966c6a48db07a0b963ab557abecd4be05f87163f25a9e328e | isakmp/ike | crypto.mli |
(* ike related crypto utilities and mappings *)
| null | https://raw.githubusercontent.com/isakmp/ike/fa93543941a77f6b09c88d8bb149dd0d40acc635/src/crypto.mli | ocaml | ike related crypto utilities and mappings | |
fd499f4c295f6d83246e3ef74c8cc147d2c558714dba561ee2172ad92a5bce4e | mput/sicp-solutions | 2_39.rkt | #lang racket
Solution for exercise 2_39 .
(require rackunit "../solutions/utils.rkt")
(provide reverse-rf reverse-lf)
(define (reverse-lf items)
(foldl (lambda (item acc)
(cons item acc)) '() items))
(define (reverse-rf items)
(foldr (lambda (item acc)
(append acc (list item)))
(... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_39.rkt | racket | #lang racket
Solution for exercise 2_39 .
(require rackunit "../solutions/utils.rkt")
(provide reverse-rf reverse-lf)
(define (reverse-lf items)
(foldl (lambda (item acc)
(cons item acc)) '() items))
(define (reverse-rf items)
(foldr (lambda (item acc)
(append acc (list item)))
(... | |
d86973c40863ddfd3e5413391fcdfa5330c10110e4de8e036c2efffa5f1ea2c0 | Jarzka/stylefy | rum.cljs | (ns stylefy.rum
(:require [stylefy.rum.dom :as stylefy-rum-dom]))
(defn init []
(stylefy-rum-dom/->RumDom)) | null | https://raw.githubusercontent.com/Jarzka/stylefy/c4c3a9b1d230605e2d08a769d83d632e696d84a0/modules/stylefy-rum/src/cljs/stylefy/rum.cljs | clojure | (ns stylefy.rum
(:require [stylefy.rum.dom :as stylefy-rum-dom]))
(defn init []
(stylefy-rum-dom/->RumDom)) | |
5a922968f414aecb0d389f5ab033153d5686cabd9d8388aad6dc6dc5b2d54e04 | fterrier/pylos | app.cljs | (ns pylos.game.app
(:require [cljs.core.async :as async :refer [<! chan close! put! pub sub]]
[goog.events :as events]
[goog.history.EventType :as EventType]
[om-tools.core :refer-macros [defcomponent]]
[om-tools.dom :as dom :include-macros true]
[om.core :a... | null | https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/src/cljs/pylos/game/app.cljs | clojure | (ns pylos.game.app
(:require [cljs.core.async :as async :refer [<! chan close! put! pub sub]]
[goog.events :as events]
[goog.history.EventType :as EventType]
[om-tools.core :refer-macros [defcomponent]]
[om-tools.dom :as dom :include-macros true]
[om.core :a... | |
555608f60f4b23788168f28407fb71e6809ac88964f4c1a2caee1078a2b3011c | camllight/camllight | vect.mli | (* Operations on vectors *)
value vect_length : 'a vect -> int = 1 "vect_length"
(* Return the length (number of elements) of the given vector. *)
;;
value vect_item : 'a vect -> int -> 'a
[ vect_item v n ] returns the element number [ n ] of vector [ v ] .
The first element has number 0 .
... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/vect.mli | ocaml | Operations on vectors
Return the length (number of elements) of the given vector.
[init_vect n f] returns a fresh array of length [n],
with element number [i] equal to [f i].
[concat_vect v1 v2] returns a fresh vector containing the
concatenation of vectors [v1] and [v2].
[sub_vect v star... |
value vect_length : 'a vect -> int = 1 "vect_length"
;;
value vect_item : 'a vect -> int -> 'a
[ vect_item v n ] returns the element number [ n ] of vector [ v ] .
The first element has number 0 .
The last element has number [ vect_length v - 1 ] .
Raise [ Invalid_argument " ve... |
2586960609dc02e829478ab510f89fbf2d5be4ec2d1df39ecf2620bfbb383063 | nbloomf/webdriver-w3c | Assert.hs | |
Module : Web . Api . WebDriver . Assert
Description : Mini language for making falsifiable assertions .
Copyright : 2018 , Automattic , Inc.
License : GPL-3
Maintainer : ( )
Stability : experimental
Portability : POSIX
In this module we define assertions as first class objects... | null | https://raw.githubusercontent.com/nbloomf/webdriver-w3c/e48dbd65597631c694e039dde493ca02333a3a4a/src/Web/Api/WebDriver/Assert.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards #
* Assertions
* The `Assert` Class
* Assertion Summaries
* Basic Assertions
| An `Assertion` consists of the following:
* A human-readable statement being asserted, which may be either true or false.
* A result (either success or failure).
To construct assertions... | |
Module : Web . Api . WebDriver . Assert
Description : Mini language for making falsifiable assertions .
Copyright : 2018 , Automattic , Inc.
License : GPL-3
Maintainer : ( )
Stability : experimental
Portability : POSIX
In this module we define assertions as first class objects... |
0e85ba7861450b650f3f16f69c01fd2a84e195f3755667fc9c3fd7ebff96f4ce | err0r500/realworld-app-simple-haskell | Utils.hs | module Http.Utils where
import Network.HTTP.Types
import qualified Network.Wai.Test as W
import RIO
import qualified RIO.ByteString.Lazy as LB
import Test.Hspec.Wai
postSimpleJSON :: ByteString -> LB.ByteString -> WaiSession st W.SResponse
postSimpleJSON path = request methodPost path [(hContentType, "application/jso... | null | https://raw.githubusercontent.com/err0r500/realworld-app-simple-haskell/20ec982256ec890f0c77b572eccef987cd3799bf/test/Http/Utils.hs | haskell | module Http.Utils where
import Network.HTTP.Types
import qualified Network.Wai.Test as W
import RIO
import qualified RIO.ByteString.Lazy as LB
import Test.Hspec.Wai
postSimpleJSON :: ByteString -> LB.ByteString -> WaiSession st W.SResponse
postSimpleJSON path = request methodPost path [(hContentType, "application/jso... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.