_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
3a4eb99ec51a19c5f7fc4e89dfd4e92785aa039f670b32eb37c402b1ca9e9500
samuelrivas/moka
moka_history_tests.erl
Copyright ( c ) 2013 , < > %%% All rights reserved. %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% * Redistributions of source code must retain the above copyright %%% notice, this list of conditio...
null
https://raw.githubusercontent.com/samuelrivas/moka/92521e43d1d685794f462ed49403c99baeae0226/test/unit/moka_history_tests.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistr...
Copyright ( c ) 2013 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTI...
7782fd82d1c36561086a1c3afb126101b6d47bc1d93c290acd19eca7a5a1891c
mokus0/junkbox
DeCasteljau.hs
module Math.DeCasteljau where import Data.VectorSpace interp a x y = lerp x y a deCasteljau [] t = [] deCasteljau ps t = ps : deCasteljau (zipWith (interp t) ps (tail ps)) t bezier ps = head . last . deCasteljau ps split ps t = (map head pss, reverse (map last pss)) where pss = deCasteljau ps t
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Math/DeCasteljau.hs
haskell
module Math.DeCasteljau where import Data.VectorSpace interp a x y = lerp x y a deCasteljau [] t = [] deCasteljau ps t = ps : deCasteljau (zipWith (interp t) ps (tail ps)) t bezier ps = head . last . deCasteljau ps split ps t = (map head pss, reverse (map last pss)) where pss = deCasteljau ps t
a4dfc99b50b0667ab31e63d67bbcc91d98eb78ce7e5617feddade246376c624e
Yume-Labs/prism
db_test.clj
(ns prism.db-test (:require [clojure.test :refer :all] [prism.db :refer :all] [prism.helpers :refer [with-test-node full-config full-nft second-nft partia...
null
https://raw.githubusercontent.com/Yume-Labs/prism/1dd2c0f4eac8bbd32877a40617b36c1319d8f114/t/prism/db_test.clj
clojure
(ns prism.db-test (:require [clojure.test :refer :all] [prism.db :refer :all] [prism.helpers :refer [with-test-node full-config full-nft second-nft partia...
e64f67c61ccbf626304cd11523e487591eebebc1851e0b2a8b8e61631672261b
leocadiotine/fred
image_saver.clj
(ns fred.image-saver (:require [fs.core :as fs])) (defn substitute [s substitution-map] (reduce (fn [s [match replacement]] (clojure.string/replace s match replacement)) s substitution-map)) (defn rename-droid "Returns a string that matches Android's resource naming requirements: all low...
null
https://raw.githubusercontent.com/leocadiotine/fred/8fa95f83f5fec49bc35676dc6261e0cbccb911fc/code/src/fred/image_saver.clj
clojure
(ns fred.image-saver (:require [fs.core :as fs])) (defn substitute [s substitution-map] (reduce (fn [s [match replacement]] (clojure.string/replace s match replacement)) s substitution-map)) (defn rename-droid "Returns a string that matches Android's resource naming requirements: all low...
b575f6c085330f6be9047c10ee3e4c8db0fc6ecf980e59176d431fcf13d8593d
AdRoll/rebar3_format
type_specs.erl
-module(type_specs). -include_lib("syntax_tools/include/merl.hrl"). -export([f/1, b/0, c/2]). -export_type([t/0, ot/2, ff2/0]). -type aa() :: _. -type t() :: integer(). -type ff(A) :: ot(A, A) | tuple() | 1..3 | map() | {}. -type ff1() :: ff(bin()) | foo:bar(). -type ff2() :: {list(), [_], list(integer()), ...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/src/otp_samples/type_specs.erl
erlang
-type m4() :: #{_ => _, ...}. -type m5() :: #{any() => any(), ...}.
-module(type_specs). -include_lib("syntax_tools/include/merl.hrl"). -export([f/1, b/0, c/2]). -export_type([t/0, ot/2, ff2/0]). -type aa() :: _. -type t() :: integer(). -type ff(A) :: ot(A, A) | tuple() | 1..3 | map() | {}. -type ff1() :: ff(bin()) | foo:bar(). -type ff2() :: {list(), [_], list(integer()), ...
fa904d15efbcca243ed8af9dd901709abccacf07e91c6fff76093944de0d67b3
hidaris/thinking-dumps
steak.rkt
#lang typed/racket (define-type meza (U Shrimp Calamari Escargots Hummus)) (struct Shrimp () #:transparent) (struct Calamari () #:transparent) (struct Escargots () #:transparent) (struct Hummus () #:transparent) (define-type main (U Steak Ravioli Chicken Eggplant)) (struct Steak ()...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/typed-racket/04-look-to-the-stars/steak.rkt
racket
we don't need a type denotation here. I'm confused on how to use pattern match here. (define eq-main (lambda (t m) (cond [(and (Steak? t) (Steak? m)) true] [(and (Chicken? t) (Chicken? m)) true] [(and (Eggplant? t) (Eggplant? m)) true] [else false]))) ok, I find it. (define (eq-...
#lang typed/racket (define-type meza (U Shrimp Calamari Escargots Hummus)) (struct Shrimp () #:transparent) (struct Calamari () #:transparent) (struct Escargots () #:transparent) (struct Hummus () #:transparent) (define-type main (U Steak Ravioli Chicken Eggplant)) (struct Steak ()...
218c63d060d1e2dd145028c0e935f7aabef80c646527fe43d5a959999d240baa
lesguillemets/sicp-haskell
1.45.hs
module OneFortyfive where import NewtonsMethod repeated :: (a -> a) -> Int -> a -> a repeated _ 0 = id repeated f n = f . repeated f (n-1) nthRoot :: Int -> Double -> Double nthRoot n x = fixP (repeated averaageDamp n' (\y -> x / y^(n-1))) 1.0 where n' = floor . logBase 2 $ fromIntegral n -- | -- >>> import Text....
null
https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect3/1.45.hs
haskell
| >>> import Text.Printf
module OneFortyfive where import NewtonsMethod repeated :: (a -> a) -> Int -> a -> a repeated _ 0 = id repeated f n = f . repeated f (n-1) nthRoot :: Int -> Double -> Double nthRoot n x = fixP (repeated averaageDamp n' (\y -> x / y^(n-1))) 1.0 where n' = floor . logBase 2 $ fromIntegral n > > > printf " % .4f "...
99e6809aeef66fbbf7ffa1c04058d04e275db0d101c506e3ae8052f4387fa829
nd/bird
3.6.2.hs
p = ( m + n ) div 2 -- if m + 1 < n ( m + n ) div 2 = -- {def of div} floor ( ( m + n ) / 2 ) = ( ( m + n ) / 2 ) < n and floor ( ( m + n ) / 2 ) < n = > ( m + n ) div 2 < n also ( ( m + n ) / 2 ) > m { since m + 1 < n } -- so we get m < p < n -- -- if m + 1 = n ( m + n ) div 2 = ( m + m + 1 ) div 2 = ( 2...
null
https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch03/3.6.2.hs
haskell
if m + 1 < n {def of div} so we get m < p < n if m + 1 = n
p = ( m + n ) div 2 ( m + n ) div 2 = floor ( ( m + n ) / 2 ) = ( ( m + n ) / 2 ) < n and floor ( ( m + n ) / 2 ) < n = > ( m + n ) div 2 < n also ( ( m + n ) / 2 ) > m { since m + 1 < n } ( m + n ) div 2 = ( m + m + 1 ) div 2 = ( 2 m + 1 ) div 2 = floor ( m + 0.5 ) = m
b839be61869ea1937b0e24dd2e423d3c2cae1cea6e074f0a44cbdfc844effe69
hoon0612/Lisp-in-OCaml
parser.mli
type token = | Int of (int) | Float of (float) | String of (string) | Symbol of (string) | Quote | Opener | Closer val pmain : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Types.s_exp
null
https://raw.githubusercontent.com/hoon0612/Lisp-in-OCaml/498ace173018af8f7772b3db803872e76b5902cf/parser.mli
ocaml
type token = | Int of (int) | Float of (float) | String of (string) | Symbol of (string) | Quote | Opener | Closer val pmain : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Types.s_exp
0d915128379c7d83e8b8190728f4fa4463ce8ed0355dfa4b88aba76dbf18fcff
chiroptical/thinking-with-types
HList.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators ...
null
https://raw.githubusercontent.com/chiroptical/thinking-with-types/781f90f1b08eb94ef3600c5b7da92dfaf9ea4285/Chapter5/src/HList.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # Heterogenous List data Any = forall a. Any a -> one cannot use where (or let) to keep `t` and `ts` -> as the same types in the signature -> and t...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module HList where import Data.Kind (Constraint, Type) import GHC.TypeLits (TypeError) import GHC.TypeLits (Err...
50f2fa1bbd604898f378d41da71ab31a07f122fcaa29812839ba94a9d72f264c
gusbicalho/effects-toy
WaiHandler.hs
# LANGUAGE BlockArguments # module Polysemy.EffectsToy.Interpreter.WaiHandler ( runWaiHandler -- * Re-exports , module Polysemy.EffectsToy.Effect.WaiHandler ) where import Polysemy import Polysemy.Reader import Polysemy.State import Polysemy.Writer import Polys...
null
https://raw.githubusercontent.com/gusbicalho/effects-toy/e1905ced0f56b13448c1880285f77b957726f50d/toy-polysemy/src/Polysemy/EffectsToy/Interpreter/WaiHandler.hs
haskell
* Re-exports
# LANGUAGE BlockArguments # module Polysemy.EffectsToy.Interpreter.WaiHandler ( runWaiHandler , module Polysemy.EffectsToy.Effect.WaiHandler ) where import Polysemy import Polysemy.Reader import Polysemy.State import Polysemy.Writer import Polysemy.EffectsToy.Eff...
1b84b308ff4fb0614d21ab68097284996acec974e7ec851493c89adc7c41649e
fluree/ledger
performance.clj
(ns fluree.db.ledger.Performance.performance (:require [clojure.java.io :as io] [criterium.core :as criterium] [fluree.db.api :as fdb] [clojure.tools.logging :as log] [clojure.core.async :as async] [fluree.db.test-helpers :as test] [clojure.edn :...
null
https://raw.githubusercontent.com/fluree/ledger/2b7819f38c6d9f8347028e4458fb8a301a3d9a35/test/fluree/db/ledger/Performance/performance.clj
clojure
UTILITY FUNCTIONS - Time and Results Formatting TEST TRANSACTIONS TEST QUERIES For now, these are hard-coded block-query-coll (get-query-type queries :block-query offset) block-query-bench (test-queries myDb (fn [db q] (async/<!! ...
(ns fluree.db.ledger.Performance.performance (:require [clojure.java.io :as io] [criterium.core :as criterium] [fluree.db.api :as fdb] [clojure.tools.logging :as log] [clojure.core.async :as async] [fluree.db.test-helpers :as test] [clojure.edn :...
76b08e305faaf9bcbd3750322cdc797f2398d898a28e1168c99ec581012b6e31
MLstate/opalang
weakResArray.mli
Copyright © 2011 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 useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/weakResArray.mli
ocaml
Copyright © 2011 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 useful , ...
f67cdce67afa2c29c1c52c4f27da88db507c957d728c66c516a296a536621f8a
stchang/mlish
sweet-map.rkt
#lang sweet-exp mlish define sum [lst : (List Int)] → Int match lst with [] -> 0 x :: xs -> {x + sum(xs)} define map [f : (→ X Y)] [lst : (List X)] → (List Y) match lst with [] -> nil x :: xs -> cons f x map f xs sum map string->number (list "1" "2" "3")
null
https://raw.githubusercontent.com/stchang/mlish/1c79d71b686fc734b7994eb9d412f84d518a64b1/mlish-test/tests/mlish/sweet-map.rkt
racket
#lang sweet-exp mlish define sum [lst : (List Int)] → Int match lst with [] -> 0 x :: xs -> {x + sum(xs)} define map [f : (→ X Y)] [lst : (List X)] → (List Y) match lst with [] -> nil x :: xs -> cons f x map f xs sum map string->number (list "1" "2" "3")
0339ebb2ea3f38f466c0b8b1f0ac91414c99ba025d81abbdd7ec155dad25f7fd
fogus/minderbinder
solid_angle.clj
(ns minderbinder.solid-angle (:require [minderbinder.core :refer (defunits-of)])) (defunits-of solid-angle :steradian "" ;; Solid angle which cuts off an area of the surface ;; of the sphere equal to that of a square with ;; sides of length equal to the radius of the sphere. :steradian #{:sr})
null
https://raw.githubusercontent.com/fogus/minderbinder/35b10b279b241fbeab38f63af568e6302f40930a/src/minderbinder/solid_angle.clj
clojure
Solid angle which cuts off an area of the surface of the sphere equal to that of a square with sides of length equal to the radius of the sphere.
(ns minderbinder.solid-angle (:require [minderbinder.core :refer (defunits-of)])) (defunits-of solid-angle :steradian "" :steradian #{:sr})
0146f706a2e7816a55f058ab7c07837191e3c3093626c0c3ca679af7f89aee17
erlang/otp
erl_eval_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1998 - 2023 . All Rights Reserved . %% 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 applic...
null
https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/stdlib/test/erl_eval_SUITE.erl
erlang
%CopyrightBegin% 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 License for the specific l...
Copyright Ericsson AB 1998 - 2023 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erl_eval_SUITE). -feature(maybe_expr, enable). -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_su...
3a8287876275533754576b852fe1965dc06f77b490f8173d101f63dd5c9d4103
korya/efuns
testmain.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/perf/Lex/testmain.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . $ I d : testmain.ml , v 1.1 1999/11/22 10:36:01 lefessan Exp $ #open "syntax";; #open "testscanner";; #open ...
54e438b313b31a7f19283fde36d7108830f2bba88f5d986ccb3e3a345b24b311
agrafix/users
Definitions.hs
{-# LANGUAGE EmptyDataDecls #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUA...
null
https://raw.githubusercontent.com/agrafix/users/55fb8571aa6a6a0a20eb696635734defb09f0da1/users-persistent/src/Web/Users/Persistent/Definitions.hs
haskell
# LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Web.Users.Persistent.Definiti...
ec5a88f1ca04557201c1f91e924f872895aad4bb79243ce7918a450b554b9db6
SamB/coq
cic2acic.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/xml/cic2acic.ml
ocaml
********************************************************************** ********************************************************************** This file is distributed under the terms of the ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * The HELM Pro...
edf70f2ec2474c464e4f1be861750a58b001bae21590654628325be856af9ee9
kupl/LearnML
patch.ml
type nat = ZERO | SUCC of nat let rec natadd (n1 : nat) (n2 : nat) : nat = match n1 with ZERO -> n2 | SUCC n1 -> SUCC (natadd n1 n2) let rec natmul (n1 : nat) (n2 : nat) : nat = match n1 with ZERO -> ZERO | SUCC n1 -> natadd n2 (natmul n1 n2)
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub24/patch.ml
ocaml
type nat = ZERO | SUCC of nat let rec natadd (n1 : nat) (n2 : nat) : nat = match n1 with ZERO -> n2 | SUCC n1 -> SUCC (natadd n1 n2) let rec natmul (n1 : nat) (n2 : nat) : nat = match n1 with ZERO -> ZERO | SUCC n1 -> natadd n2 (natmul n1 n2)
7984fc22cfc07867a66bbe63ecf3d4d41d244797e8eb3c29eeb255a1ac13e5e6
russell/cl-git
diff.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*- ;; ;; cl-git is a Common Lisp interface to git repositories. Copyright ( C ) 2011 - 2022 < > ;; ;; 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 Fre...
null
https://raw.githubusercontent.com/russell/cl-git/db84343e6b756b26fc64877583b41e887bd74602/tests/diff.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- cl-git is a Common Lisp interface to git repositories. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY...
Copyright ( C ) 2011 - 2022 < > as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public (in-package #:cl-git-tests) (in-suite :cl-git) (defun sort-flags (object &rest key-pat...
d8952a2829696ccb63ea5361c2984297f843501a815dcea9ac251bdeb03e1c28
bytekid/mkbtt
inferences.ml
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * 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 , either version 3 of the License , or (...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/inferences.ml
ocaml
** SUBMODULES ********************************************************* ** OPENS ************************************************************** ** FUNCTIONS **********************************************************
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * 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 , either version 3 of the License , or (...
569bd9813eb8c92133610a805501e4b16b1e24913f69809ac25dd8e7bf8f0828
tari3x/csec-modex
pitsyntax.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/pitsyntax.ml
ocaml
Global table of identifiers, including names, functions, variables, predicates, and types. Is a map from strings to the description of the ident * Types * Table of bound names of the process Functions || ((arity == 0) && (not is_private)) Equations Definitions of destructors by rewrite rules Check cl...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
006635eadfdd1d8c73e4bee251575b01dbbf47a26e5595531511c94d10ddd045
AndreaCrotti/elo
utils.cljs
(ns byf.utils "Various utility functions for Clojurescript" (:require [clojure.string :as str] [goog.object :as object] [re-frame.core :as rf])) (def min-width 500) (defn classes [cls] (str/join " " (map name (filter some? cls)))) (defn set-val ([handler...
null
https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/src/cljs/byf/utils.cljs
clojure
(ns byf.utils "Various utility functions for Clojurescript" (:require [clojure.string :as str] [goog.object :as object] [re-frame.core :as rf])) (def min-width 500) (defn classes [cls] (str/join " " (map name (filter some? cls)))) (defn set-val ([handler...
eec785ee5643ebfb1ba1147c619f81e60333575f9d390fdcb839a5810d0d90d7
screenshotbot/screenshotbot-oss
run-builder.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/replay/run-builder (:use #:cl) (:nicknames :screenshot...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/b833d9995edc36d8188cd4b7f23a14bed26d6f1f/src/screenshotbot/replay/run-builder.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (defpackage :screenshotbot/replay/run-builder (:use #:cl) (:nicknames :screenshotbot/pro/replay/run-builder) (:import-from #:screenshotbo...
9ef6c7deac4f3b67e10e253d814b0daa3a9281e6e0b3ef056c09e59d9b30db73
2600hz/kazoo
cb_media.erl
%%%----------------------------------------------------------------------------- ( C ) 2011 - 2020 , 2600Hz %%% @doc Account module %%% Store/retrieve media files %%% %%% @author %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distribute...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/modules/cb_media.erl
erlang
----------------------------------------------------------------------------- @doc Account module Store/retrieve media files @end ----------------------------------------------------------------------------- ============================================================================= API ======================...
( C ) 2011 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(cb_media). -export([init/0 ,allowed_methods/0, allowed_methods/1, allowed_methods/2 ...
0da2bf9b54f91c573ce2b6416250f5e29a5c41d3f6aa8087ba2017444960ab69
cjay/vulkyrie
Instance.hs
{-# LANGUAGE Strict #-} module Vulkyrie.Vulkan.Instance ( createVulkanInstance ) where import Data.Text (pack) import qualified Data.Text as Text import Foreign.C.String (peekCString) import Graphics.Vulkan import Graphics.Vulkan....
null
https://raw.githubusercontent.com/cjay/vulkyrie/7ec31181bd456c863da96743c216ff6610d3cd00/src/Vulkyrie/Vulkan/Instance.hs
haskell
# LANGUAGE Strict # ^ application name ^ engine name ^ required extensions ^ required layer names
module Vulkyrie.Vulkan.Instance ( createVulkanInstance ) where import Data.Text (pack) import qualified Data.Text as Text import Foreign.C.String (peekCString) import Graphics.Vulkan import Graphics.Vulkan.Core_1_0 import ...
74d789f963fe7ede8d1648efeba7e861986edcf1238bb87d2ea1e4efa1b28ec1
simonmichael/shelltestrunner
Print.hs
-- Print tests in any of the supported formats. -- Useful for debugging and for migrating between formats. -- Issues: -- converting v1 -> v2/v3 a > > > = 0 often gets converted to a > > > 2 // or > 2 // , when > = or nothing would be preferred ( but semantically less accurate , therefore risky to choose automatica...
null
https://raw.githubusercontent.com/simonmichael/shelltestrunner/10084f69dc0e39588535dce9c39211cc198414b3/src/Print.hs
haskell
Print tests in any of the supported formats. Useful for debugging and for migrating between formats. Issues: converting v1 -> v2/v3 converting v3 -> v3 loses comments at the top of the file, even above an explicit < delimiter may lose other data | Print a shell test. See CLI documentation for details. Fo...
a > > > = 0 often gets converted to a > > > 2 // or > 2 // , when > = or nothing would be preferred ( but semantically less accurate , therefore risky to choose automatically ) module Print where import Safe (lastMay) import Import import Types printShellTest -> IO () printShellTest format ShellTest{command=c,...
ed6e1ef8bc2a6f2fb5d5322054121f5db647585151839cd474038bc1d48864fd
jyh/metaprl
top_conversionals.ml
doc <:doc< @spelling{th} @module[Top_conversionals] @emph{Conversions} and @emph{conversionals} are analogs of tactics and tacticals (Section~@refmodule[Top_tacticals]) for rewriting. Conversions are used extensively in Computational Type Theory (Section @refmodule[Itt_theory]) to express and app...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/support/tactics/top_conversionals.ml
ocaml
* Debugging. *********************************************************************** * REDUCTION RESOURCE * *********************************************************************** unused let opnames_of_terms options = List.fold_left (fun options t -> OpnameS...
doc <:doc< @spelling{th} @module[Top_conversionals] @emph{Conversions} and @emph{conversionals} are analogs of tactics and tacticals (Section~@refmodule[Top_tacticals]) for rewriting. Conversions are used extensively in Computational Type Theory (Section @refmodule[Itt_theory]) to express and app...
c6fd224a20341bde19b24ff2277b7270bcea2099b871d98eee7d62868e939500
kappelmann/eidi2_repetitorium_tum
ColUtils.mli
open Collection module ColUtils (C: Collection) : sig val filter : ('a -> bool) -> 'a C.t -> 'a C.t (* apply function to every element of C *) val for_all : ('a -> 'b) -> 'a C.t -> 'b C.t val length : 'a C.t -> int (* check if an element of C satifies the predicate *) val exists : ('a...
null
https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/2016/functors/solutions/ColUtils.mli
ocaml
apply function to every element of C check if an element of C satifies the predicate
open Collection module ColUtils (C: Collection) : sig val filter : ('a -> bool) -> 'a C.t -> 'a C.t val for_all : ('a -> 'b) -> 'a C.t -> 'b C.t val length : 'a C.t -> int val exists : ('a -> bool) -> 'a C.t -> 'a option merge two collections into one val merge : 'a C.t -> 'a C....
90463204ed8ef252af0da9216cc63116542167c18c7365a981fd49310376fd0a
nextjournal/clerk
example.clj
;; # 🔭 Clerk Examples ^{:nextjournal.clerk/visibility {:code :hide}} (ns example (:require [nextjournal.clerk :as clerk])) ;; Outside of Clerk, the `example` macro evaluates to `nil`, just like `clojure.core/comment`. Try this in your editor! ;; But when used in the context of Clerk, it renders the expressions wit...
null
https://raw.githubusercontent.com/nextjournal/clerk/5620618c378be87b6b7c695c145424dded1ef080/notebooks/example.clj
clojure
# 🔭 Clerk Examples Outside of Clerk, the `example` macro evaluates to `nil`, just like `clojure.core/comment`. Try this in your editor! But when used in the context of Clerk, it renders the expressions with thier resulting values.
^{:nextjournal.clerk/visibility {:code :hide}} (ns example (:require [nextjournal.clerk :as clerk])) (clerk/example (+ 1 2) (+ 41 1) (-> 42 range shuffle) (macroexpand '(example (+ 1 2))) (clerk/html [:h1 "👋"]) (range) (javax.imageio.ImageIO/read (java.net.URL. "-type=image/gif")))
3a77f03d245798349f34ee8159e1bd2942740e39cad29c5655293cf572ae2485
alex-gutev/cl-environments
package.lisp
package.lisp ;;;; Copyright 2018 ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;;; restriction, including without limitation the rights to use, ;;;; copy, mod...
null
https://raw.githubusercontent.com/alex-gutev/cl-environments/0b22154c5afefef23d1eba9a4fae11d73580ef41/src/common/package.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condi...
package.lisp Copyright 2018 files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (defpackage :cl-environm...
8390ca17ec82b2b2111bdc12bbf23cc4c4a19830dfea603be82108c3c97d6402
metosin/reitit
core.cljs
(ns frontend.core (:require [reagent.core :as r] [reitit.frontend :as rf] [reitit.frontend.easy :as rfe] [reitit.coercion.spec :as rss] [spec-tools.data-spec :as ds] [fipp.edn :as fedn])) (defn home-page [] [:div [:h2 "Welcome to frontend"] [:butto...
null
https://raw.githubusercontent.com/metosin/reitit/1ab075bd353966636f154ac36ae9b7990efeb008/examples/frontend/src/frontend/core.cljs
clojure
(ns frontend.core (:require [reagent.core :as r] [reitit.frontend :as rf] [reitit.frontend.easy :as rfe] [reitit.coercion.spec :as rss] [spec-tools.data-spec :as ds] [fipp.edn :as fedn])) (defn home-page [] [:div [:h2 "Welcome to frontend"] [:butto...
0b96a8bf3c873a8678f981ef7cd0d7bc3c511428c76dae0dc6811cc4abf3e745
district0x/district-ui-web3
subs.cljs
(ns district.ui.web3.subs (:require [district.ui.web3.queries :as queries] [re-frame.core :refer [reg-sub]])) (reg-sub ::web3 queries/web3) (reg-sub ::web3-injected? queries/web3-injected?) (reg-sub ::web3-legacy? queries/web3-legacy?)
null
https://raw.githubusercontent.com/district0x/district-ui-web3/f0c1bab3a9ef71e5cbb88e81ed6eddee7a4ed344/src/district/ui/web3/subs.cljs
clojure
(ns district.ui.web3.subs (:require [district.ui.web3.queries :as queries] [re-frame.core :refer [reg-sub]])) (reg-sub ::web3 queries/web3) (reg-sub ::web3-injected? queries/web3-injected?) (reg-sub ::web3-legacy? queries/web3-legacy?)
9e2fc8eae9d116d6efdfffae49496d012a9549a57aeb681f8e8932d65caa42cd
Clozure/ccl-tests
prin1-to-string.lsp
;-*- Mode: Lisp -*- Author : Created : Mon Jul 26 12:18:22 2004 ;;;; Contains: Tests of PRIN1-TO-STRING (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest prin1-to-string.1 (random-prin1-to-string-test 5) nil) (deftest prin1-to-string.2 (with-standard-io-syntax (prin1-to-string...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/prin1-to-string.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of PRIN1-TO-STRING Error tests
Author : Created : Mon Jul 26 12:18:22 2004 (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest prin1-to-string.1 (random-prin1-to-string-test 5) nil) (deftest prin1-to-string.2 (with-standard-io-syntax (prin1-to-string 2)) "2") (deftest prin1-to-string.error.1 (signals-error ...
6618c911ea471e4eaccbde33f294000ed01366671e8935e888156b227257e688
janestreet/bonsai
bonsai_web_ui_partial_render_table_protocol.ml
open Core module Stable = struct open Core.Core_stable module Dir = struct module V1 = struct type t = [ `Asc | `Desc ] [@@deriving sexp, bin_io, equal, compare] end end module Order = struct module V1 = struct type 'col_id t = ('col_id * Dir.V1.t) list [...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/partial_render_table/protocol/bonsai_web_ui_partial_render_table_protocol.ml
ocaml
open Core module Stable = struct open Core.Core_stable module Dir = struct module V1 = struct type t = [ `Asc | `Desc ] [@@deriving sexp, bin_io, equal, compare] end end module Order = struct module V1 = struct type 'col_id t = ('col_id * Dir.V1.t) list [...
7b6ff278de128fa8d982731cf838a94f9d42835efbe337b45a065744ef0274e9
ChicagoBoss/ChicagoBoss
types.erl
%%------------------------------------------------------------------- @author ChicagoBoss Team and contributors , see file in root directory %% @end This file is part of ChicagoBoss project . See file in root directory %% for license information, see LICENSE file in root directory %% @end %...
null
https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/src/boss/types.erl
erlang
------------------------------------------------------------------- @end for license information, see LICENSE file in root directory @end @doc -------------------------------------------------------------------
@author ChicagoBoss Team and contributors , see file in root directory This file is part of ChicagoBoss project . See file in root directory -module(types). -type execution_mode() :: 'development' | 'production'. -type application() :: atom(). -type language() :: an...
cb84aa519048170e3fbc9e1ecde3cb4763a50fac235e632e163b17fd38f9cdeb
nixeagle/cl-irc
package.lisp
$ Id$ $ URL$ ;;;; See the LICENSE file for licensing information. (in-package :cl-user) ;; the exports list needs some cleanup/clarification/categorization (eval-when (:execute :load-toplevel :compile-toplevel) (defpackage :cl-irc (:use :cl) (:nicknames :irc) (:export :read-message-loop ...
null
https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/tags/0.8.0/package.lisp
lisp
See the LICENSE file for licensing information. the exports list needs some cleanup/clarification/categorization
$ Id$ $ URL$ (in-package :cl-user) (eval-when (:execute :load-toplevel :compile-toplevel) (defpackage :cl-irc (:use :cl) (:nicknames :irc) (:export :read-message-loop :read-message :irc-message-event :start-background-message-handler :stop-backg...
b21f8f6cff73c78cd2ea2522797a476c4442beda1a88e2567d79f0d355b69635
OCamlPro/ez_api
ezCurl.ml
(**************************************************************************) (* *) Copyright 2018 - 2022 OCamlPro (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/ez_api/2debe0bf97586fa231c855526fd54d69f72d1546/src/request/unix/curl/ezCurl.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2018 - 2022 OCamlPro GNU Lesser General Public License version 2.1 , with the special let make ?meth ?headers ?content ?content_type ?msg url f = EzCurl_common.log ?meth url msg; if !Verbose.v land 2 <> 0 then Format.printf "[ez_api] sent:\n%s@." (Op...
11e0cc21bb668ba1e4ab05437aab35b91f87ae7435e398fc8783e5874aac94c3
marigold-dev/mankavar
main.ml
let () = ()
null
https://raw.githubusercontent.com/marigold-dev/mankavar/51761e67f6e443766eed1f827bddb83cf777d2f9/src/sfsm/test/main.ml
ocaml
let () = ()
320ad41058af823fa17c84a5db538833914a3c8450eeb2d2753bed09828d7437
mbacarella/opws
cbc.ml
A CBC abstraction layer Copyright ( C ) 2008 < > 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 ( at your option ) any later vers...
null
https://raw.githubusercontent.com/mbacarella/opws/946b1e3e8e62712cfcdf22663ebfd857c025d5c5/cbc.ml
ocaml
A CBC abstraction layer Copyright ( C ) 2008 < > 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 ( at your option ) any later vers...
4f361e2964956bf7b8698579cc2ef8301be99509b45ecc0c55636ea7a1a55b91
ocsigen/ocaml-eliom
int32.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/stdlib/int32.mli
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 * 32 - bit integers . This module provides operations on the type [ int32 ] of signed 32 - bit...
29a77c8b16a3a3e3471b33ef7721a64adcd5004580531c1dbfb4223733797f59
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Time.HE.Corpus ( corpus ) where import Data.String i...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Time/HE/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings # "שני השמונה עשרה לפברואר" "הראשון למרץ" "ה1 למרץ" "חמש עשרה לחודש" "ב15 לחודש" "ב15 החודש" "שני, השמונה עשרה לפברואר" "יום שני, ה1...
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Time.HE.Corpus ( corpus ) where import Data.String import Prelude import Duckling.Locale import Duckling.Resolve import Duckling.Time.Corpus import Duckling.Time.Types hiding (Month) import Duckling.TimeGrain.Types hiding (add) import Duckling.T...
e7bcbea1bbaed7f6e54be50b136b4e7a018bd5bd6b3c773af20db514785d72f1
stchang/macrotypes
lang.rkt
#lang racket/base # % module - begin is from macrotypes / typecheck - core (provide (all-from-out macrotypes/typecheck-core "turnstile.rkt") (for-syntax (all-from-out racket syntax/parse)) (for-meta 2 (all-from-out racket/base syntax/parse racket/syntax))) (require (except-i...
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-lib/turnstile/lang.rkt
racket
#lang racket/base # % module - begin is from macrotypes / typecheck - core (provide (all-from-out macrotypes/typecheck-core "turnstile.rkt") (for-syntax (all-from-out racket syntax/parse)) (for-meta 2 (all-from-out racket/base syntax/parse racket/syntax))) (require (except-i...
4cfd1543c34ee9b0f09427815e635f5dc4b0c8e327546a955a27ae3c3de3bf5c
footprintanalytics/footprint-web
honeysql_extensions_test.clj
(ns metabase.util.honeysql-extensions-test (:require [clojure.test :refer :all] [honeysql.core :as hsql] [honeysql.format :as hformat] [metabase.test :as mt] [metabase.util.honeysql-extensions :as hx]) (:import metabase.util.honeysql_extensions.Identifier)) (deftest ...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/util/honeysql_extensions_test.clj
clojure
double-backticks to escape backticks seems to be the way to do it I guess this behavior makes sense? I guess untyped = "is of type nil"
(ns metabase.util.honeysql-extensions-test (:require [clojure.test :refer :all] [honeysql.core :as hsql] [honeysql.format :as hformat] [metabase.test :as mt] [metabase.util.honeysql-extensions :as hx]) (:import metabase.util.honeysql_extensions.Identifier)) (deftest ...
444a90864e5c54110daa6453f83af3c58f24a1d72bbd1027667c3d6b3559d680
rwmjones/guestfs-tools
utils.mli
virt - sparsify * Copyright ( C ) 2011 - 2023 Red Hat Inc. * * 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 * ( at your option ) any l...
null
https://raw.githubusercontent.com/rwmjones/guestfs-tools/57423d907270526ea664ff15601cce956353820e/sparsify/utils.mli
ocaml
* Utilities/common functions used in virt-sparsify only. Return true if the filesystem is a read-only LV (RHBZ#1185561).
virt - sparsify * Copyright ( C ) 2011 - 2023 Red Hat Inc. * * 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 * ( at your option ) any l...
9f8404069026a93f2763291ae8f820b4f587ee3167699b3d7ac32e81dd9c68b6
dhleong/spade
defaults.clj
(ns spade.runtime.defaults (:require [spade.container.atom :refer [->AtomStyleContainer]])) (defonce shared-styles-atom (atom nil)) (defn create-container [] (->AtomStyleContainer shared-styles-atom))
null
https://raw.githubusercontent.com/dhleong/spade/d77c2adcf451aa9c0b55bd0a835d53f95c7becf4/src/spade/runtime/defaults.clj
clojure
(ns spade.runtime.defaults (:require [spade.container.atom :refer [->AtomStyleContainer]])) (defonce shared-styles-atom (atom nil)) (defn create-container [] (->AtomStyleContainer shared-styles-atom))
e097a27d18e485140a70839e72be808a98d528e1d6361492838fa16e2bbb6960
kelamg/HtDP2e-workthrough
ex494.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 ex494) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex494.rkt
racket
about the language level of this file in a form that our tools can easily process. an accumulator? If so, why? If not, why not? A - Yes it does. It is very similar to invert in that it also uses an auxiliary function (insert in this case) which recurses on the entire list as well.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex494) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Q - Does the insertion sort > function from Auxiliar...
b5b744a55e0c2c503b64ab9c8c073158fbb46e1cdcc72d9fd91dbdbc074ee28b
nowl/detome
world-macros.lisp
(in-package #:detome) (defmacro with-gensyms (syms &body body) `(let ,(loop for s in syms collect `(,s (gensym))) ,@body)) (defmacro set-predefined-level (map) (let ((h (length map)) (w (length (car map)))) (with-gensyms (i j) `(progn (setf *level-type* :predefined *...
null
https://raw.githubusercontent.com/nowl/detome/108ed05427a34a7d42de8ecac384aca63a8ab9e0/world-macros.lisp
lisp
(in-package #:detome) (defmacro with-gensyms (syms &body body) `(let ,(loop for s in syms collect `(,s (gensym))) ,@body)) (defmacro set-predefined-level (map) (let ((h (length map)) (w (length (car map)))) (with-gensyms (i j) `(progn (setf *level-type* :predefined *...
dd60a802d3dfa9bb0bf4df1ed7cef5278796f240f7d0f15cff479bdf2969556b
Metaxal/bazaar
keyword.rkt
#lang racket/base (require define2 racket/dict racket/list) (provide keyword-apply/dict keyword-apply/simple list->pos+kw) (module+ test (require rackunit)) ;; proc : procedure? ; procedure to apply ;; kw-dict : dict? ; dictionary of keywords and values ;; A key can be eith...
null
https://raw.githubusercontent.com/Metaxal/bazaar/2968178aa62288c8ff41018a42dd306afb458046/keyword.rkt
racket
proc : procedure? ; procedure to apply kw-dict : dict? ; dictionary of keywords and values A key can be either a keyword or a symbol that is turned into a keyword. largs : list? ; positional arguments Returns the result of the application of proc to the positional arguments and to the keyword arguments. Turn...
#lang racket/base (require define2 racket/dict racket/list) (provide keyword-apply/dict keyword-apply/simple list->pos+kw) (module+ test (require rackunit)) (define (keyword-apply/dict proc kw-dict largs) (define alist (sort (for/list ([(k v) (in-dict kw-dict)]) ...
ab288be2aa80b9e68c20b150ee68b765b5b47a87f16086db3bec47c9c309bbc5
mumuki/mulang
GenericSpec.hs
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-} module GenericSpec (spec) where import Test.Hspec import Language.Mulang.Ast import Language.Mulang.Ast.Operator import Language.Mulang.Identifier import Language.Mulang.Inspector.Combiner import Language.Mulan...
null
https://raw.githubusercontent.com/mumuki/mulang/e3c7da1f3191ac3741e6916d5c78477f145bbaa9/spec/GenericSpec.hs
haskell
# LANGUAGE QuasiQuotes, OverloadedStrings #
module GenericSpec (spec) where import Test.Hspec import Language.Mulang.Ast import Language.Mulang.Ast.Operator import Language.Mulang.Identifier import Language.Mulang.Inspector.Combiner import Language.Mulang.Inspector.Contextualized import Lang...
0faa6b541ce9df9366d9f6f6f07e9bff33f76bd0c4efabcef52d2672afa60e70
glguy/tries
GenericTrie.hs
{-# LANGUAGE Safe #-} | This module implements an interface for working with maps . For primitive types , like ' Int ' , the library automatically selects an efficient implementation ( e.g. , an " IntMap " ) . For complex structured types , the library uses an implementation based on tries : this is use...
null
https://raw.githubusercontent.com/glguy/tries/f644bd3920ffff52096a2a417233a87f113dad82/src/Data/GenericTrie.hs
haskell
# LANGUAGE Safe # ** Construction ** Updates ** Queries ** Folding ** Traversing ** Combining maps ---------------------------------------------------------------------------- Various helpers ---------------------------------------------------------------------------- | Construct a trie from a list of key-value...
| This module implements an interface for working with maps . For primitive types , like ' Int ' , the library automatically selects an efficient implementation ( e.g. , an " IntMap " ) . For complex structured types , the library uses an implementation based on tries : this is useful when using large a...
6f7b2917db945ba45f97816f5e2f18730a02e6b4a5b6ec33149192da5a28af38
onaio/milia
dataset.cljc
(ns milia.api.dataset #? (:clj (:import [java.net URLEncoder] [java.nio.charset StandardCharsets])) (:refer-clojure :exclude [clone update]) (:require [chimera.seq :refer [has-keys? in?]] [chimera.core :refer [not-nil?]] [chimera.string :refer [get-query-params-str]] ...
null
https://raw.githubusercontent.com/onaio/milia/718ac4d2952417d1db845bf17ea54663ac7fa6a8/src/milia/api/dataset.cljc
clojure
(ns milia.api.dataset #? (:clj (:import [java.net URLEncoder] [java.nio.charset StandardCharsets])) (:refer-clojure :exclude [clone update]) (:require [chimera.seq :refer [has-keys? in?]] [chimera.core :refer [not-nil?]] [chimera.string :refer [get-query-params-str]] ...
cdb42f58d8f6a61c8e9a59e22ea450e3240159e69062105c1b3116fc85230a52
wdhowe/clojure-snippets
validators.clj
; validators - specify which values are allowed for an atom/reference. ; if the validator returns false, an atom's value is not changed. ; create the validator function, should return true or false (defn battery-level-validator "Returns true if battery has a valid power level." [power-level] (and (>...
null
https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/state/validators.clj
clojure
validators - specify which values are allowed for an atom/reference. if the validator returns false, an atom's value is not changed. create the validator function, should return true or false specify a validator to attach to an atom during creation
(defn battery-level-validator "Returns true if battery has a valid power level." [power-level] (and (>= power-level 0) (<= power-level 100))) (def battery (atom 50 :validator battery-level-validator)) (println "Charging battery to 100 percent.") (swap! battery + 50) (println "Charging battery 1 more pe...
6a083f1936c2e44277f4762cbcac0b6ad3b0bebf0a42a7953b862b38721c1c71
d-cent/mooncake
feed.clj
(ns mooncake.test.view.feed (:require [midje.sweet :refer :all] [net.cgrand.enlive-html :as html] [clj-time.core :as c] [clj-time.format :as f] [mooncake.routes :as routes] [mooncake.test.test-helpers.enlive :as eh] [mooncake.view.feed :as fv])) ...
null
https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/test/mooncake/test/view/feed.clj
clojure
(ns mooncake.test.view.feed (:require [midje.sweet :refer :all] [net.cgrand.enlive-html :as html] [clj-time.core :as c] [clj-time.format :as f] [mooncake.routes :as routes] [mooncake.test.test-helpers.enlive :as eh] [mooncake.view.feed :as fv])) ...
38bcde704c4ec5e64bf7c95fac60f053a4c8d1bb15e45a3b164e501fb40cc06d
multimodalrouting/osm-fulcro
layers.cljs
(ns app.ui.leaflet.layers (:require [com.fulcrologic.fulcro.components :refer [factory]] [app.ui.leaflet.layers.vectorGrid :refer [VectorGridOverlay]] [app.ui.leaflet.layers.hexbin :refer [Hexbin]] [app.ui.leaflet.layers.d3svg-osm :refer [D3SvgOSM style-topo]] [app.ui.leaflet.layers.d3svg-points :...
null
https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/ui/leaflet/layers.cljs
clojure
(ns app.ui.leaflet.layers (:require [com.fulcrologic.fulcro.components :refer [factory]] [app.ui.leaflet.layers.vectorGrid :refer [VectorGridOverlay]] [app.ui.leaflet.layers.hexbin :refer [Hexbin]] [app.ui.leaflet.layers.d3svg-osm :refer [D3SvgOSM style-topo]] [app.ui.leaflet.layers.d3svg-points :...
01224cbd716ed6fb454b6a068bea36b88f7df36d3c4c209275bae22842a68c5f
tsloughter/kuberl
kuberl_v1beta1_network_policy_list.erl
-module(kuberl_v1beta1_network_policy_list). -export([encode/1]). -export_type([kuberl_v1beta1_network_policy_list/0]). -type kuberl_v1beta1_network_policy_list() :: #{ 'apiVersion' => binary(), 'items' := list(), 'kind' => binary(), 'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta() ...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_network_policy_list.erl
erlang
-module(kuberl_v1beta1_network_policy_list). -export([encode/1]). -export_type([kuberl_v1beta1_network_policy_list/0]). -type kuberl_v1beta1_network_policy_list() :: #{ 'apiVersion' => binary(), 'items' := list(), 'kind' => binary(), 'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta() ...
e4013c8472ac07d3083c20cc2aff90da013dddda3d5d739ea289b8ac6fee3491
mhayashi1120/Gauche-dbd-sqlite3
test.scm
;; ;; Test dbd.sqlite3 module ;; (use gauche.test) (test-start "dbd.sqlite3") (use dbi) (use dbd.sqlite3) (use gauche.collection) (use gauche.version) (use gauche.threads) (test-module 'dbd.sqlite3) ;; This checks the exported symbols are indeed bound. ;; Normal operation test (define connection #f) (define (selec...
null
https://raw.githubusercontent.com/mhayashi1120/Gauche-dbd-sqlite3/f298c4ce2ac181dca4b373057651e5ccd9f63923/test.scm
scheme
Test dbd.sqlite3 module This checks the exported symbols are indeed bound. Normal operation test Must close result if rset is pending query. See the ROLLBACK section. non existent table See the ROLLBACK section. Open pending query non existent table statement will return SQLITE_ABORT upon next access ...
(use gauche.test) (test-start "dbd.sqlite3") (use dbi) (use dbd.sqlite3) (use gauche.collection) (use gauche.version) (use gauche.threads) (define connection #f) (define (select-rows sql . params) (let1 rset (apply dbi-do connection sql '() params) (unwind-protect (map identity rset) (dbi-close rset...
64772ec513ee7c8d7a66e3aa5396e88f3c699ee606a83097c84a0213aa219992
chenyukang/eopl
18.scm
(load-relative "../libs/init.scm") (load-relative "./base/test.scm") (load-relative "./base/data-structures.scm") (load-relative "./base/type-structures.scm") (load-relative "./base/type-module.scm") (load-relative "./base/grammar.scm") (load-relative "./base/renaming.scm") (load-relative "./base/subtyping.scm") (load-...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch8/18.scm
scheme
code refactor
(load-relative "../libs/init.scm") (load-relative "./base/test.scm") (load-relative "./base/data-structures.scm") (load-relative "./base/type-structures.scm") (load-relative "./base/type-module.scm") (load-relative "./base/grammar.scm") (load-relative "./base/renaming.scm") (load-relative "./base/subtyping.scm") (load-...
a943f6325806fa345743cc8900c51499562ea4ed29cd5d36d802618bc3dfd7e3
msakai/toysolver
Rational.hs
{-# OPTIONS_HADDOCK show-extensions #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : ToySolver.Data.Polynomial.Factorization.Rational Copyright : ( c ) 2013 -- License : BSD-style -...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/Data/Polynomial/Factorization/Rational.hs
haskell
# OPTIONS_HADDOCK show-extensions # # LANGUAGE TypeSynonymInstances # --------------------------------------------------------------------------- | Module : ToySolver.Data.Polynomial.Factorization.Rational License : BSD-style Maintainer : Stability : provisional Portability : non-portable ----...
# LANGUAGE FlexibleInstances # Copyright : ( c ) 2013 module ToySolver.Data.Polynomial.Factorization.Rational () where import Data.List (foldl') import Data.Ratio import ToySolver.Data.Polynomial.Base (UPolynomial) import qualified ToySolver.Data.Polynomial.Base as P import ToySolver.Data.Polynomial.Factoriz...
7fccb8b71b3a7fd1a661826cf288f997f302d2ffcb8863d6da607213e9d9675f
obsidiansystems/beam-automigrate
Postgres.hs
# LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Database.Beam.AutoMigrate.Postgres ( getSchema, ) where import Control.Monad.State import Data.Bits (shiftR, (.&.)) import Data.B...
null
https://raw.githubusercontent.com/obsidiansystems/beam-automigrate/6e1f316576d8ad0b9a91f691059d67952e51c648/src/Database/Beam/AutoMigrate/Postgres.hs
haskell
# LANGUAGE MultiWayIf # Necessary types to make working with the underlying raw SQL a bit more pleasant | The columns in the /current/ table. Postgres queries to extract the schema out of the DB | A SQL query to select all user's queries, skipping any beam-related tables (i.e. leftovers from beam-migrate, for ...
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Database.Beam.AutoMigrate.Postgres ( getSchema, ) where import Control.Monad.State import Data.Bits (shiftR, (.&.)) import Data.ByteString (ByteString) impor...
36fc5ba1581715f60a4b77ab4842601349c340d4ae5fd52dcb29e66dfc73f6a4
melange-re/melange
jsoo_485_test.ml
let f () = (ref None) := Some 3 Uncaught ReferenceError : Invalid left - hand side in assignment (* function f() { /* None */0 = /* Some */[3]; return /* () */0; }*) let () = f ()
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/jsoo_485_test.ml
ocaml
function f() { /* None */0 = /* Some */[3]; return /* () */0; }
let f () = (ref None) := Some 3 Uncaught ReferenceError : Invalid left - hand side in assignment let () = f ()
855ed3e6bec88f86e0c4023bd45a3921dcfff3b7eb5dc9e3a13405e9e1d42ba3
fpco/ghc-prof-flamegraph
ProfFile.hs
# LANGUAGE TupleSections # | Parser for .prof files generated by GHC . module ProfFile ( Time(..) , Line(..) , lIndividualTime , lInheritedTime , lIndividualAlloc , lInheritedAlloc , parse , processLines , findStart ) where import Control.Arrow (second, left) import Data.Char ...
null
https://raw.githubusercontent.com/fpco/ghc-prof-flamegraph/8edd3b4806adeb25a4d55bed51c3afcc8e7a8e14/ProfFile.hs
haskell
| Returns a function accepting the children and returning a fully formed 'Line'. subdirectory name)! * Ends with '>' or * Contains a colon eventually followed by another colon or a minus This heuristic will break if: condition (currently, they're all numeric) or The implementation is not very...
# LANGUAGE TupleSections # | Parser for .prof files generated by GHC . module ProfFile ( Time(..) , Line(..) , lIndividualTime , lInheritedTime , lIndividualAlloc , lInheritedAlloc , parse , processLines , findStart ) where import Control.Arrow (second, left) import Data.Char ...
598fd0f5a3479729908fd9889e6c53c52adc239eb955c2e8a01984d51ab8a12f
heitor-lassarote/iolp
AST.hs
module Language.CSS.AST where import Universum import Data.Aeson type Attribute = (Text, Text) type ClassName = Text data AST = CSS ![Class] deriving (Eq, Generic, Show, FromJSON, ToJSON) data Class = Class !ClassName ![Attribute] deriving (Eq, Show) instance FromJSON Class where parseJSON = w...
null
https://raw.githubusercontent.com/heitor-lassarote/iolp/6284ff7127969b95a841a5d7b2af07aa77a38b2d/code-generator/src/Language/CSS/AST.hs
haskell
module Language.CSS.AST where import Universum import Data.Aeson type Attribute = (Text, Text) type ClassName = Text data AST = CSS ![Class] deriving (Eq, Generic, Show, FromJSON, ToJSON) data Class = Class !ClassName ![Attribute] deriving (Eq, Show) instance FromJSON Class where parseJSON = w...
de901111283181ab6efe024e18f52a1aefb91f3934989b70bf2db6150c743ad7
ekmett/ekmett.github.com
Char.hs
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - incomplete - patterns # {-# OPTIONS_HADDOCK prune #-} -- | Module : Data . Buffer . Rope . Copyright : ( c ) 2006 ( c ) 2006 ( c ) 2010 -- License : BSD-style -- -- Maintainer : -- Stability : experim...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/buffer/Data/Buffer/Rope/Char.hs
haskell
# OPTIONS_HADDOCK prune # | License : BSD-style Maintainer : Stability : experimental Portability : portable Some operations, such as concat, append, reverse and cons, have better complexity than their "Data.Buffer" equivalents, due to optimisations resulting from the fingertree spine. ...
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - incomplete - patterns # Module : Data . Buffer . Rope . Copyright : ( c ) 2006 ( c ) 2006 ( c ) 2010 clashes with " Prelude " functions . eg . > import qualified Data . Buffer . Rope . as R Original G...
db4b6bf01a5e092ecdc96831c0473808f91b5d6c29a00014b4cdea5785c7b35a
martijnbastiaan/doctest-parallel
Spec.hs
module Main where import Test.Hspec import qualified ExtractSpec import qualified GhciWrapperSpec import qualified InterpreterSpec import qualified LocationSpec import qualified MainSpec import qualified OptionsSpec import qualified ParseSpec import qualified PropertySpec import qualified RunnerSpec import qualified ...
null
https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/80d7024bbf2f2c751bb497b94276749c7dc6bf99/test/Spec.hs
haskell
module Main where import Test.Hspec import qualified ExtractSpec import qualified GhciWrapperSpec import qualified InterpreterSpec import qualified LocationSpec import qualified MainSpec import qualified OptionsSpec import qualified ParseSpec import qualified PropertySpec import qualified RunnerSpec import qualified ...
bcaa964325ed2f19c5e6bbfaf5f808722e021d563288c458a6f365581018efc6
mattmundell/nightshade
nlx.lisp
;;; The definitions of VOPs used for non-local exit (throw, lexical exit, ;;; etc.) (in-package "ALPHA") MAKE - NLX - SP - TN -- Interface ;;; Make an environment - live stack TN for saving the SP for NLX entry . ;;; (def-vm-support-routine make-nlx-sp-tn (env) (environment-live-tn (make-representation-t...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/alpha/nlx.lisp
lisp
The definitions of VOPs used for non-local exit (throw, lexical exit, etc.) entry. Save and restore dynamic environment. These VOPs are used in the reentered function to restore the appropriate dynamic environment. Currently we only save the Current-Catch and binding stack pointer. We don't need to save/r...
(in-package "ALPHA") MAKE - NLX - SP - TN -- Interface Make an environment - live stack TN for saving the SP for NLX entry . (def-vm-support-routine make-nlx-sp-tn (env) (environment-live-tn (make-representation-tn *fixnum-primitive-type* immediate-arg-scn) env)) Make - NLX - Entry - Argument - Sta...
9bce828a5942a313f6b4919e41aaa571f8f19936986efb4f35dedb67f2f00113
TheInnerLight/dormouse
RequestBuilding.hs
# LANGUAGE QuasiQuotes # # LANGUAGE DataKinds # module RequestBuilding where import Control.Exception.Safe (MonadThrow) import Dormouse.Client import Dormouse.Url.QQ import Dormouse.Url.Builder githubHttpsUrl :: Url "https" githubHttpsUrl = [https||] githubHttpUrl :: Url "http" githubHttpUrl = [http||] githubAnyUr...
null
https://raw.githubusercontent.com/TheInnerLight/dormouse/c790c32d2ec234a2c2c4e54c604df15f9a2e25a7/examples/src/RequestBuilding.hs
haskell
# LANGUAGE QuasiQuotes # # LANGUAGE DataKinds # module RequestBuilding where import Control.Exception.Safe (MonadThrow) import Dormouse.Client import Dormouse.Url.QQ import Dormouse.Url.Builder githubHttpsUrl :: Url "https" githubHttpsUrl = [https||] githubHttpUrl :: Url "http" githubHttpUrl = [http||] githubAnyUr...
9a9826bd24da86ec33fc05e3205bed5f046890f5f60036b7e04626511767c1d8
minad/henk
HenkParser.hs
module Henk.HenkParser where import Text.Megaparsec import Text.Megaparsec.Text.Lazy import qualified Text.Megaparsec.Lexer as L import Henk.HenkAS import Henk.HenkPP() integer :: Parser Integer integer = lexeme L.integer symbol :: String -> Parser String symbol = L.symbol whiteSpace semi :: Parser String semi = sy...
null
https://raw.githubusercontent.com/minad/henk/73135b5fd2ce2b8f03fe0082bc7be621eb432e94/Henk/HenkParser.hs
haskell
-------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- Type Declaration -------------------------------------------------------------- --------------------------------------------------...
module Henk.HenkParser where import Text.Megaparsec import Text.Megaparsec.Text.Lazy import qualified Text.Megaparsec.Lexer as L import Henk.HenkAS import Henk.HenkPP() integer :: Parser Integer integer = lexeme L.integer symbol :: String -> Parser String symbol = L.symbol whiteSpace semi :: Parser String semi = sy...
9913c33abc98b03b669cce5bbedc7eab73c22d8c89184bf8100aa847ec5549c9
tpapp/cl-random
design-matrix.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- (in-package #:cl-random) ;;; building blocks for a DSL for design matrices ( list ... ) ;;; ;;; term := constant | covariate | interaction ;;; ;;; covariate := symbol | (^ symbol exponent) ;;; ;;; interaction := (* covariate1 covariate2 ...) ...
null
https://raw.githubusercontent.com/tpapp/cl-random/5bb65911037f95a4260bd29a594a09df3849f4ea/src/design-matrix.lisp
lisp
Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- building blocks for a DSL for design matrices term := constant | covariate | interaction covariate := symbol | (^ symbol exponent) interaction := (* covariate1 covariate2 ...) or lists of these, for interactions.
(in-package #:cl-random) ( list ... ) (defun interaction-matrix (&rest matrices) "Return the interaction matrix. Last indexes change the fastest." (let+ ((matrices (mapcar (lambda (matrix) (typecase matrix (dense-matrix-like ...
e151a429a2e7d53d09ea8e854dcd92071a274cb19fa7e5af87894fbbf50eac19
Archenoth/clj-anki
hash_test.clj
(ns clj-anki.hash-test (:require [clojure.test :refer :all] [clj-anki.hash :refer :all])) (deftest sha1-test (testing "We can get an SHA1 hex string of the passed in value" (is (= (sha1-hex "embarrasing") "f20ee772b10c517107620d3be38697967a7a2e96")) (is (= (sha1-hex "漢字") "50008262c76205f015248...
null
https://raw.githubusercontent.com/Archenoth/clj-anki/c9ae899862038de21eeca7ca1b7a48a1ce24d03e/test/clj_anki/hash_test.clj
clojure
(ns clj-anki.hash-test (:require [clojure.test :refer :all] [clj-anki.hash :refer :all])) (deftest sha1-test (testing "We can get an SHA1 hex string of the passed in value" (is (= (sha1-hex "embarrasing") "f20ee772b10c517107620d3be38697967a7a2e96")) (is (= (sha1-hex "漢字") "50008262c76205f015248...
4d9afb0ba2a393ea430a39ae362da3860e830fc37667f28a924ba46eda53a933
ghc/packages-Cabal
QuickCheck.hs
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -fno - warn - orphans # module UnitTests.Distribution.Solver.Modular.QuickCheck (tests) where import Prelude () import Distribution.Client.Compat.Prelude import Control.Arrow ((&&&)) import Data.Either (lefts) import Data.Hasha...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs
haskell
This test checks that certain solver parameters do not affect the existence of a solution. It runs the solver twice, and only sets those can affect the existence of a solution to both runs. no - count - conflicts , because the goal order used with --count-conflicts depends on the total set of conflicts seen by the ...
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -fno - warn - orphans # module UnitTests.Distribution.Solver.Modular.QuickCheck (tests) where import Prelude () import Distribution.Client.Compat.Prelude import Control.Arrow ((&&&)) import Data.Either (lefts) import Data.Hasha...
d7fd1f2477f03bb2dfb344c425ac1cda5e783fd7598a7fd49a8c2e7ed7982ade
abdulapopoola/SICPBook
5.35.scm
;; Compiled expression ;; (define (f x) ( + x ( g ( + x 2 ) ) ) ) ;; DERIVATION (assign val (op make-compiled-procedure) (label entry16) (reg env)) (goto (label after-lambda15)) entry16 (assign env (op compiled-procedure-env) (reg proc)) ;; x is defined and environm...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%205/5.5/5.35.scm
scheme
Compiled expression (define (f x) DERIVATION x is defined and environment extended operation + is added -> (+ operation g (a procedure) is added -> (g
( + x ( g ( + x 2 ) ) ) ) (assign val (op make-compiled-procedure) (label entry16) (reg env)) (goto (label after-lambda15)) entry16 (assign env (op compiled-procedure-env) (reg proc)) (assign env (op extend-environment) (const (x)) (reg a...
3daa5da5afbbaac1bafdae2ffcce89d17635c314fbe75368a6a929aa7d3777c0
nadeemabdulhamid/racketui
web-launch.rkt
#lang racket (require "tfield.rkt" "syntax.rkt" "web.rkt") (require racket/runtime-path web-server/safety-limits web-server/servlet web-server/servlet-env web-server/managers/lru) (require (for-syntax syntax/parse)) (define-runtime-path htdocs "./htdocs") launch - web : / funct...
null
https://raw.githubusercontent.com/nadeemabdulhamid/racketui/045e0e647439623397cdf67e8e045ec7aa5e2def/web-launch.rkt
racket
user syntax ============================================================================
#lang racket (require "tfield.rkt" "syntax.rkt" "web.rkt") (require racket/runtime-path web-server/safety-limits web-server/servlet web-server/servlet-env web-server/managers/lru) (require (for-syntax syntax/parse)) (define-runtime-path htdocs "./htdocs") launch - web : / funct...
322586796d08f8c431c211f226fcca73d3ec4e9c24d64a5aff9b51a25c572064
jtza8/interact
package.lisp
; Use of this source code is governed by a BSD-style license that can be found in the license.txt file ; in the root directory of this project. (in-package :interact) (use-package :xlunit) (defparameter *test-sprite-path* (asdf:system-relative-pathname :interact "tests/test-sprites")) (defparameter *test-image-pa...
null
https://raw.githubusercontent.com/jtza8/interact/ea2121d7e900dac4fe2a085bd5f2783a640e71f8/src/tests/package.lisp
lisp
Use of this source code is governed by a BSD-style in the root directory of this project.
license that can be found in the license.txt file (in-package :interact) (use-package :xlunit) (defparameter *test-sprite-path* (asdf:system-relative-pathname :interact "tests/test-sprites")) (defparameter *test-image-path* (asdf:system-relative-pathname :interact-tests "test-images/")) (defparameter *test-font...
a7062ed7f7824c735ad6df7017d8fbad3afe94ae8d8b8358a390c6394b7f8ad3
generateme/metadoc
codox.clj
(ns metadoc.writers.codox "Documentation writer that outputs HTML." (:use [hiccup core page element util]) (:import [java.net URLEncoder] [com.vladsch.flexmark.ast Link LinkRef] [com.vladsch.flexmark.ext.wikilink WikiLink WikiLinkExtension] [com.vladsch.flexmark.html HtmlRenderer ...
null
https://raw.githubusercontent.com/generateme/metadoc/ac773832e4f677517800b14f7b3973a5ad52a9ae/src/metadoc/writers/codox.clj
clojure
The values in ns-tree-part are chosen for aesthetic reasons, based on a text size of 15px and a line height of 31px. update namespaces and variables
(ns metadoc.writers.codox "Documentation writer that outputs HTML." (:use [hiccup core page element util]) (:import [java.net URLEncoder] [com.vladsch.flexmark.ast Link LinkRef] [com.vladsch.flexmark.ext.wikilink WikiLink WikiLinkExtension] [com.vladsch.flexmark.html HtmlRenderer ...
15d2b1700c1608bb59cd32fb0dec64bbc967fecd55aa2f7ce69224a142182a22
drym-org/qi
qi.rkt
#lang racket/base (provide cond-fn compose-fn root-mean-square fact ping eratos collatz filter-map-fn filter-map-values double-list double-values) (require (only-in math sqr) (only-in racket/list range) qi) (d...
null
https://raw.githubusercontent.com/drym-org/qi/a8bd930eda09e07b8f44fd2e7100b7be96d446ea/qi-sdk/profile/qi.rkt
racket
#lang racket/base (provide cond-fn compose-fn root-mean-square fact ping eratos collatz filter-map-fn filter-map-values double-list double-values) (require (only-in math sqr) (only-in racket/list range) qi) (d...
b7a8985d475ddd5bc0d741d742774ed9aab20904edd7601aebf2043dd895b918
na4zagin3/satyrographos
template_docMake_ja.ml
SPDX - License - Identifier : CC0 - 1.0 SPDX-License-Identifier: CC0-1.0 *) let name = "[experimental]doc-make@ja" let local_satyh_template = "local.satyh", {|% プロジェクト用函数・コマンド定義用ファイル @require: code @require: math let-block ctx +frame content = let pads = (10pt, 10pt, 10pt, 10pt) in let decoset = VDeco...
null
https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/src/template/template_docMake_ja.ml
ocaml
SPDX - License - Identifier : CC0 - 1.0 SPDX-License-Identifier: CC0-1.0 *) let name = "[experimental]doc-make@ja" let local_satyh_template = "local.satyh", {|% プロジェクト用函数・コマンド定義用ファイル @require: code @require: math let-block ctx +frame content = let pads = (10pt, 10pt, 10pt, 10pt) in let decoset = VDeco...
89f1b61d3b502f76cc051f3bdacfd1dffbafd3daf43aa6ed0d744b223d98faf8
mu-chaco/ReWire
X.hs
module Mods.C.X (x, y, X(..), Y, Y(YB)) where data X = XA | XB data Y = YA | YB x :: X x = XA y :: Y y = YA
null
https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/tests/regression/Mods/C/X.hs
haskell
module Mods.C.X (x, y, X(..), Y, Y(YB)) where data X = XA | XB data Y = YA | YB x :: X x = XA y :: Y y = YA
1d66d021b720380410e50a50b775c1cd933a6e44306e586a39c0c54b4c44263f
skrah/minicaml
Shared.mli
* Copyright ( c ) 2015 . All rights reserved . * * This file is distributed under the terms of the Q Public License * version 1.0 . * Copyright (c) 2015 Stefan Krah. All rights reserved. * * This file is distributed under the terms of the Q Public License * version 1.0. *) val internal_error : st...
null
https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/Shared.mli
ocaml
* Copyright ( c ) 2015 . All rights reserved . * * This file is distributed under the terms of the Q Public License * version 1.0 . * Copyright (c) 2015 Stefan Krah. All rights reserved. * * This file is distributed under the terms of the Q Public License * version 1.0. *) val internal_error : st...
ed4b0aa2e36c2ea7df70f3f826fdd616e8f41d8e3f33e255f067511fc6cc7635
NorfairKing/smos
Gen.hs
# OPTIONS_GHC -fno - warn - orphans # module Smos.GitHub.Issue.Gen where import Data.GenValidity import Data.GenValidity.Text () import GitHub import Smos.GitHub.Issue instance GenValid GitHubUrl instance GenValid IssueNumber instance GenValid (Name a)
null
https://raw.githubusercontent.com/NorfairKing/smos/3b7021c22915ae16ae721c7da60d715e24f4e6bb/smos-github/test/Smos/GitHub/Issue/Gen.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Smos.GitHub.Issue.Gen where import Data.GenValidity import Data.GenValidity.Text () import GitHub import Smos.GitHub.Issue instance GenValid GitHubUrl instance GenValid IssueNumber instance GenValid (Name a)
433c0144a613ffb6693da436026cf7ca325ca111c8420146b6d155d826bbb654
crategus/cl-cffi-gtk
gtk.scrollable.lisp
;;; ---------------------------------------------------------------------------- gtk.scrollable.lisp ;;; The documentation of this file is taken from the GTK+ 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK+ library . ;;; See <>. The API documentation of the Lisp binding is ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/gtk/gtk.scrollable.lisp
lisp
---------------------------------------------------------------------------- See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (at your option) any later versi...
gtk.scrollable.lisp The documentation of this file is taken from the GTK+ 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK+ library . available from < -cffi-gtk/ > . Copyright ( C ) 2012 - 2021 as published by the Free Software Foundation , either version 3 of the the...
bb6482c74a569a63d814226a015b36fb8f2d59097e7fcf50f13c1a38c166266b
jyh/metaprl
sil_state_model.ml
* Model the state as a dependant record . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/sil/sil_state_model.ml
ocaml
*********************************************************************** * SYNTAX * *********************************************************************** * Type of labels. * We carry alnong the type, but we don't use it right now. * Declarations ar...
* Model the state as a dependant record . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc...
e4dd174fc2a5ad57777c0a8d6afa3abca61437aa7c56bc5c2f6e56bd24610ee5
parsimony-ide/parsimony
server.clj
(ns parsimony.server (:require [com.stuartsierra.component :as component] [environ.core :refer [env]] [fipp.edn :refer [pprint]] [parsimony.log :as log] [parsimony.server.handler :refer [all-routes]] [parsimony.server.algo :refer [new-algo]] [par...
null
https://raw.githubusercontent.com/parsimony-ide/parsimony/1744e8b4a921a50dfbd0815499cf3af1059590c8/src/parsimony/server.clj
clojure
(ns parsimony.server (:require [com.stuartsierra.component :as component] [environ.core :refer [env]] [fipp.edn :refer [pprint]] [parsimony.log :as log] [parsimony.server.handler :refer [all-routes]] [parsimony.server.algo :refer [new-algo]] [par...
c0423f253ceb557c49e8e037e552cf4ec180549a2ba3a8a9accfad65315a7a92
nikodemus/SBCL
alloc.lisp
;;;; allocating simple objects This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is ;;;...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/assembly/x86-64/alloc.lisp
lisp
allocating simple objects more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Signed and unsigned bignums from word-sized integers. Argument and return in the same register. No VOPs, as these a...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") # + SB - ASSEMBLING as we do n't need , just the asm routines : #+sb-assembling (macrolet ((d...
6e163639797e913f94a73ae4941b601163f6b3c1c7123077a884d2d719bdedb0
nuscr/nuscr
codegen.mli
module Fstar = Fstarcodegen module Go = Gocodegen module Ocaml = Ocamlcodegen
null
https://raw.githubusercontent.com/nuscr/nuscr/c268be6f40d689f0834a2c04de6bcc23d1307aea/lib/codegen/codegen.mli
ocaml
module Fstar = Fstarcodegen module Go = Gocodegen module Ocaml = Ocamlcodegen
ddb2d279dad7640e21d9b0db511073edbc89e7f71bb8824d1bd62d9adb1ef94f
thheller/shadow-cljs
b.cljs
(ns demo.esm.b) (def bar (str :bar "demo.esm.b/bar"))
null
https://raw.githubusercontent.com/thheller/shadow-cljs/1a76102e05d9ec51115585fdb66087ee5fd7a3d9/src/dev/demo/esm/b.cljs
clojure
(ns demo.esm.b) (def bar (str :bar "demo.esm.b/bar"))
27066f18d0dd5560456441b135b82368ca48715c98a870e3ec22be5d7a4efe6e
herd/herdtools7
Interpreter.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/daedd7431cb00884afea2ec39749222e2c367c6b/asllib/Interpreter.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2015 - 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...
d9d37af470fe0dd36ba9c58a2b8de290034479e94a660a9e47fac3ec0f998126
bburdette/chordster
OscDests.hs
module Handler.OscDests where import Import import qualified Data.Text as T oscDestForm :: Maybe OSCDest -> Form OSCDest oscDestForm mbod = renderTable $ OSCDest <$> areq textField "Name" (oSCDestName <$> mbod) <*> areq textField "IP" (oSCDestIp <$> mbod) <*> areq intField "Port" (oSCDestPort <$> mbod) <*> ar...
null
https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/Handler/OscDests.hs
haskell
module Handler.OscDests where import Import import qualified Data.Text as T oscDestForm :: Maybe OSCDest -> Form OSCDest oscDestForm mbod = renderTable $ OSCDest <$> areq textField "Name" (oSCDestName <$> mbod) <*> areq textField "IP" (oSCDestIp <$> mbod) <*> areq intField "Port" (oSCDestPort <$> mbod) <*> ar...
4b32132eb31877ab4a79355f979634fcf8cb5b2b2dfd3c4df80f9411138ae4b4
3b/3bgl-misc
state-helper.lisp
(in-package #:scenegraph) (defparameter *v* nil) (defclass scenegraph-state-helper () ()) (defmethod basecode::run-main-loop :around ((w scenegraph-state-helper)) (let ((*runtime-values-cache* (make-hash-table)) (*known-states* (make-hash-table :test #'equalp)) (*state-defaults* (make-h...
null
https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/scenegraph/state-helper.lisp
lisp
(in-package #:scenegraph) (defparameter *v* nil) (defclass scenegraph-state-helper () ()) (defmethod basecode::run-main-loop :around ((w scenegraph-state-helper)) (let ((*runtime-values-cache* (make-hash-table)) (*known-states* (make-hash-table :test #'equalp)) (*state-defaults* (make-h...
fa8868daf881e11cedba454ca70a812c5b3f4c67a43f384e8fed702e61a5b827
tonsky/Clojure-Sublimed
stacktraces.cljc
(ns stacktraces) (defn f [] (throw (ex-info "Error" {:data :data}))) (defn g [] (f)) (defn h [] (g)) (g) (h) (/ 1 0) (meta #'h) (try (h) (catch Exception e (with-out-str (.printStackTrace e (java.io.PrintWriter. *out*))))) (defn -main [& args] (h))
null
https://raw.githubusercontent.com/tonsky/Clojure-Sublimed/5ff0e6126adce5cbca4fa6b7f69398834bba8544/test_repl/stacktraces.cljc
clojure
(ns stacktraces) (defn f [] (throw (ex-info "Error" {:data :data}))) (defn g [] (f)) (defn h [] (g)) (g) (h) (/ 1 0) (meta #'h) (try (h) (catch Exception e (with-out-str (.printStackTrace e (java.io.PrintWriter. *out*))))) (defn -main [& args] (h))
ebe37dc9f0b717140fc05d6117e7472e7abb3471d88b57e090b407c82c2b010e
nikita-volkov/graph-db
Log.hs
# LANGUAGE UndecidableInstances # module GraphDB.Persistent.Log where import GraphDB.Util.Prelude import qualified GraphDB.Action as A import qualified GraphDB.Graph as G import qualified GraphDB.Util.FileSystem import qualified GraphDB.Util.DIOVector as V -- * Log ------------------------- type Log s = [Entry s] ...
null
https://raw.githubusercontent.com/nikita-volkov/graph-db/3e886f6b298d2b2b09eb94c2818a7b648f42cb0a/library/GraphDB/Persistent/Log.hs
haskell
* Log ----------------------- | A serializable representation of a granular transaction action. Essential for persistence. * Action -----------------------
# LANGUAGE UndecidableInstances # module GraphDB.Persistent.Log where import GraphDB.Util.Prelude import qualified GraphDB.Action as A import qualified GraphDB.Graph as G import qualified GraphDB.Util.FileSystem import qualified GraphDB.Util.DIOVector as V type Log s = [Entry s] data Entry s = GetRoot | NewNo...
2fe4c71b9cd5ea94382f7eae1151a27cdbac083720b02821e26648faafb64272
mmottl/gsl-ocaml
blas_gen.mli
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 type order = Blas.order = | RowMajor | ColMajor type transpose = Blas.transpose = | NoTrans | Trans | ConjTrans type upl...
null
https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/blas_gen.mli
ocaml
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 type order = Blas.order = | RowMajor | ColMajor type transpose = Blas.transpose = | NoTrans | Trans | ConjTrans type upl...
2ee18201f80d624bd765cc1bf8d7684645e74b2fc298c090fbaf7d5bacbf96cf
apache/couchdb-rebar
rebar_otp_app.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% rebar : Erlang Build Tools %% Copyright ( c ) 2009 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this softw...
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/src/rebar_otp_app.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sel...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- rebar : Erlang Build Tools Copyright ( c ) 2009 ( ) in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the...
9087cd9740a14d8c19ff772e2f4aa2b3a25336d508109ee88710599a6c6d20a3
skogsbaer/HTF
JsonOutput.hs
{-# LANGUAGE OverloadedStrings #-} -- Copyright ( c ) 2005 - 2022 - -- -- This library 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 ; either version 2.1 of the License , or ( at your option...
null
https://raw.githubusercontent.com/skogsbaer/HTF/a42450c89b7a3a3a50e381f36de3ac28faab2a16/Test/Framework/JsonOutput.hs
haskell
# LANGUAGE OverloadedStrings # This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library 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 ...
Copyright ( c ) 2005 - 2022 - License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 ,...
dc8070f22976e287c96cc623b1bd4b91343f8ba0b3104f0764d1c3c918e52a8f
sadiqj/ocaml-esp32
inline_and_simplify_aux.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/middle_end/inline_and_simplify_aux.mli
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2016 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the [@@@ocaml.warning "+a-4-9-30-40-41-42"] module Env : sig type t ...
ccbb2c1348ce9e8f44ca1321c78bf3fb952149334c82bf92ffaca3a0be57e053
CardanoSolutions/kupo
MonadAsync.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module Kupo.Control.MonadAsync ( MonadAsync (..) , concurrently4 , forConcurrently_ , mapConcurrently_ ) where import C...
null
https://raw.githubusercontent.com/CardanoSolutions/kupo/fa37a0e569cc5d8faee925bf19f0349dac7b3990/src/Kupo/Control/MonadAsync.hs
haskell
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module Kupo.Control.MonadAsync ( MonadAsync (..) , concurrently4 , forConcurrently_ , mapConcurrently_ ) where import C...
4412b737e3862d00b4572a3c837fd5c6a383cd704e204870b263a6c21f57a946
nomeata/haskell-via-sokoban
03ex-without-winning.hs
{-# LANGUAGE OverloadedStrings #-} import CodeWorld -- Lists data List a = Empty | Entry a (List a) mapList :: (a -> b) -> List a -> List b mapList _ Empty = Empty mapList f (Entry c cs) = Entry (f c) (mapList f cs) combine :: List Picture -> Picture combine Empty = blank combine (Entry p ps) = p & combine ps allL...
null
https://raw.githubusercontent.com/nomeata/haskell-via-sokoban/0ae9d6e120c2851eca158c01e08e2c4c7f2b06d0/code/03ex-without-winning.hs
haskell
# LANGUAGE OverloadedStrings # Lists Coordinates The maze The state Event handling Yes, ' may be part of an identifier Drawing Cunning! The complete activity The general activity type Resetable activities Start screen The main function
import CodeWorld data List a = Empty | Entry a (List a) mapList :: (a -> b) -> List a -> List b mapList _ Empty = Empty mapList f (Entry c cs) = Entry (f c) (mapList f cs) combine :: List Picture -> Picture combine Empty = blank combine (Entry p ps) = p & combine ps allList :: List Bool -> Bool allList Empty = Tru...
cf1cdf67f66157b10e4c784ccf3bbcb40a2b51ac280c25a816560def9d5cb03f
huangz1990/SICP-answers
test-64-list-tree.scm
(load "test-manager/load.scm") (load "64-list-tree.scm") (define-each-check (equal? (list->tree '(1 3 5 7 9 11)) '(5 (1 () (3 () ())) (9 (7 () ()) (11 () ())))) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-64-list-tree.scm
scheme
(load "test-manager/load.scm") (load "64-list-tree.scm") (define-each-check (equal? (list->tree '(1 3 5 7 9 11)) '(5 (1 () (3 () ())) (9 (7 () ()) (11 () ())))) ) (run-registered-tests)
332c5d33eaa17623556a115a0727297e8fbfa6b623208d2c543b511d7edee628
anoma/juvix
Base.hs
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} {-# HLINT ignore "Avoid restricted extensions" #-} {-# HLINT ignore "Avoid restricted flags" #-} module Juvix.Prelude.Base ( module Juvix.Prelude.Base, module Control.Applicative, module Data.Map.Strict, module Data.Set, mod...
null
https://raw.githubusercontent.com/anoma/juvix/0f29b3ee936c3498e3e7e22ed27fc0e6a38133e0/src/Juvix/Prelude/Base.hs
haskell
# LANGUAGE BangPatterns # # OPTIONS_GHC -Wno-unrecognised-pragmas # # HLINT ignore "Avoid restricted extensions" # # HLINT ignore "Avoid restricted flags" # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Stri...
module Juvix.Prelude.Base ( module Juvix.Prelude.Base, module Control.Applicative, module Data.Map.Strict, module Data.Set, module Data.IntMap.Strict, module Data.IntSet, module Control.Monad.Extra, module Control.Monad.Fix, module Data.Bitraversable, module Data.Bool, module...