_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 |
|---|---|---|---|---|---|---|---|---|
da5c9f7ba7ea2a2a012fe63b9d1c11330fcfc5931fe59b155fc0f350b0bd0869 | MaskRay/OJHaskell | A.hs | import Control.Monad
import Data.Char
main=interact$ap((:).toUpper.head)tail
| null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Codeforces/281/A.hs | haskell | import Control.Monad
import Data.Char
main=interact$ap((:).toUpper.head)tail
| |
43a5dce842267acc3632a158fcb227bbb10f7c8e6bf04ebfb990ad6f8c359782 | ojarjur/multischeme | main.scm | Copyright 2013
;;
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
distributed under the Li... | null | https://raw.githubusercontent.com/ojarjur/multischeme/637d80ae7e42a660ae8e5d6e609e896a6d826787/src/main.scm | scheme |
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 language governing per... | Copyright 2013
distributed under the License is distributed on an " AS IS " BASIS ,
(load "src/builtins.scm")
(load "src/desugar.scm")
(load "src/multitask.scm")
(define (write-with-newline expr) (begin (write expr) (newline)))
(define rewrite-rules initial-rewrite-rules)
(define defined-globals
(append
ex... |
a4ac615b1a63aec1c2f152bd4bbd2240c821c05208070b5d82e9e647668a206f | qitab/bazelisp | warning.lisp | Copyright 2015 - 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
;;; A basic package defining compiler warnings independent from
the CL implementation . TODO(czak ): Extend for other than SBCL .
;;;
(cL:defpackage #:bazel.wa... | null | https://raw.githubusercontent.com/qitab/bazelisp/674f05c38585528d7d18e00b0def98493b646510/warning.lisp | lisp |
license that can be found in the LICENSE file or at
.
A basic package defining compiler warnings independent from
not really a simple-warning
not really a simple-warning
- FAIL-STACK-ALLOCATE-NOTES - will fail if the notes show up.
Use nowarn = ["stack-allocate-note"] to override.
| Copyright 2015 - 2020 Google LLC
Use of this source code is governed by an MIT - style
the CL implementation . TODO(czak ): Extend for other than SBCL .
(cL:defpackage #:bazel.warning
(:use #:common-lisp)
(:export #:style
#:undefined-variable-p
#:undefined-variable-warning
#... |
cecf91a51d04a10dc531a3d1b1d4d9d84a8de6b48b87ae752191ca5d66734bfd | bdeket/rktsicm | vector-calculus.rkt | #lang racket/base
(require rackunit
"../../main.rkt"
"../helper.rkt"
)
(define the-tests
(test-suite
"calculus/vector-calculus"
(test-case
"Test setup for spherical system"
(define spherical R3-rect)
(define-coordinates (up r theta phi) spherical)
(define spherical-p... | null | https://raw.githubusercontent.com/bdeket/rktsicm/5125a3fcfad1545bd520d1e2f3b50cb542708202/rktsicm/sicm/tests/calculus/vector-calculus.rkt | racket | normalized spherical basis
Test of Gradient
Test of Curl
Test of Divergence
Obtaining the wave equation.
We like units. | #lang racket/base
(require rackunit
"../../main.rkt"
"../helper.rkt"
)
(define the-tests
(test-suite
"calculus/vector-calculus"
(test-case
"Test setup for spherical system"
(define spherical R3-rect)
(define-coordinates (up r theta phi) spherical)
(define spherical-p... |
e102283b260c162a48d7f3a15e9032b4cb5f569359af2e5dc5313afcf1ca4541 | hipsleek/hipsleek | checks.ml | #include "xdebug.cppo"
open VarGen
Created 24 - 08 - 2006
Sanity Checks
Created 24 - 08 - 2006
Sanity Checks
*)
open Globals
module I = Iast
(* receives a class and checks if there are no field names duplications within that class *)
let no_field_duplication_within_class (c : I.data_decl) : bool =
... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/checks.ml | ocaml | receives a class and checks if there are no field names duplications within that class
An Hoa [22/08/2011] : modify to use function instead of hard code field name extraction
An Hoa [22/08/2011] : modify to use function instead of hard code field name extraction
receives a class and checks if there are no method... | #include "xdebug.cppo"
open VarGen
Created 24 - 08 - 2006
Sanity Checks
Created 24 - 08 - 2006
Sanity Checks
*)
open Globals
module I = Iast
let no_field_duplication_within_class (c : I.data_decl) : bool =
let flag = ref true in
begin
List.iter
(List.iter
if (!flag = true) &... |
efc4b872fcbf6114ef3c2db32b2d00421d501d98b658eb216c29e2bd6ef5713c | weblocks-framework/weblocks | uri.lisp |
(in-package :weblocks)
(wexport '(request-uri-path
add-get-param-to-url
remove-parameter-from-uri
parse-location-hash)
'(t util))
;;; URI from pathname
(defmethod puri:uri ((thing pathname))
(puri:uri
(format nil "~A~{~A/~}~A~A"
(if (eql (car (pathname-direct... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/utils/uri.lisp | lisp | URI from pathname
|
(in-package :weblocks)
(wexport '(request-uri-path
add-get-param-to-url
remove-parameter-from-uri
parse-location-hash)
'(t util))
(defmethod puri:uri ((thing pathname))
(puri:uri
(format nil "~A~{~A/~}~A~A"
(if (eql (car (pathname-directory thing)) :absolute)... |
5a452a0746ce4112258d5700fc7f1d177943739464da0837762215ebd598c9f1 | siraben/zkeme80 | boot.scm | (define boot-asm
`((label boot)
(label shutdown)
(di)
(ld a 6)
(out (4) a)
(ld a #x81)
(out (7) a)
(ld sp 0)
(call sleep)
(label restart)
(label reboot)
(di)
(ld sp 0)
(ld a 6)
(out (4) a)
(ld a #x81)
(out (7) a)
(ld a 3)
(out (#xe) a)
(xor ... | null | https://raw.githubusercontent.com/siraben/zkeme80/ab49d496cac6797e6e3264ee027f96040eaf0492/src/boot.scm | scheme | Arbitrarily complicated macros!
(call #x50f)
"main", after everything has been set up.
Just go straight to the Forth portion! | (define boot-asm
`((label boot)
(label shutdown)
(di)
(ld a 6)
(out (4) a)
(ld a #x81)
(out (7) a)
(ld sp 0)
(call sleep)
(label restart)
(label reboot)
(di)
(ld sp 0)
(ld a 6)
(out (4) a)
(ld a #x81)
(out (7) a)
(ld a 3)
(out (#xe) a)
(xor ... |
96cb40e997f9457d1daf2eccee09b43c23d7d688a16012c541360c9dfcba4a7e | MarkCurtiss/sicp | 3_38_to_3_38.scm | 3.38
; ========================================================================
;; a.
$ 45 , $ 35 , $ 40 , $ 50
;; b.
;; The following sequence of interleaved events incorrectly leaves the
bank with $ 40 when it should have $ 45 .
"
+-----+ +----+ +----+
|Peter| |Paul| |Mary|
+... | null | https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_3_exercises/3_38_to_3_38.scm | scheme | ========================================================================
a.
b.
The following sequence of interleaved events incorrectly leaves the | 3.38
$ 45 , $ 35 , $ 40 , $ 50
bank with $ 40 when it should have $ 45 .
"
+-----+ +----+ +----+
|Peter| |Paul| |Mary|
+--+--+ +--+-+ +-+--+
| | |
| | |
v v |
Access: $100... |
f0fc495c0532c9a4de126eac70b34670cae52334d2e06364cce954454e81dfaf | may-liu/qtalk | http_setmackey.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_setmackey).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _ } = cowboy_req:method(Req),
catch ejb_monitor:monito... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_setmackey.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(http_setmackey).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _ } = cowboy_req:method(Req),
catch ejb_monitor:monitor_count(<<"http_set_mac_key">>,1),
case Method of
<<"GET"... |
5e9ecc604d3eaae913d94214042f8cbc2c8003e281ec5b27f551242f07ce4e41 | triffon/fp-2022-23 | 10.filter.rkt | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 10
Напишете функция ` ( filter pred ? L ) ` ,
която връща списък от елементите на ` L ` , за които ` pred ? ` е истина .
(define (filter p? L)
(cond ((null? L) L)
((p? (car L)) (cons (car L) (filter p? (cdr L))))
(else (filter p? (c... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/b6991b5be25fb65d1e44b49ff612eb4e63f7caae/exercises/cs2/04.scheme.lists/solutions/10.filter.rkt | racket | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 10
Напишете функция ` ( filter pred ? L ) ` ,
която връща списък от елементите на ` L ` , за които ` pred ? ` е истина .
(define (filter p? L)
(cond ((null? L) L)
((p? (car L)) (cons (car L) (filter p? (cdr L))))
(else (filter p? (c... | |
51825700a01d9c0af4d88d660299dedc79143abc861872455deb6809a101228d | julienXX/clj-slack | rtm.clj | (ns clj-slack.rtm
(:require [clj-slack.core :refer [slack-request]]))
(defn start
"Starts a Real Time Messaging session."
[connection]
(slack-request connection "rtm.start"))
(defn connect
"Starts a Real Time Messaging session. Recommended over start:
"
[connection]
(slack-request connection "rtm.conn... | null | https://raw.githubusercontent.com/julienXX/clj-slack/ff5649161646f11dd8d52d1315c0e74dc723eeb7/src/clj_slack/rtm.clj | clojure | (ns clj-slack.rtm
(:require [clj-slack.core :refer [slack-request]]))
(defn start
"Starts a Real Time Messaging session."
[connection]
(slack-request connection "rtm.start"))
(defn connect
"Starts a Real Time Messaging session. Recommended over start:
"
[connection]
(slack-request connection "rtm.conn... | |
28ae3b73be95e59b078008df99ff37316c359694b3aee308cccd002ce5107ce5 | anton-k/reader-pattern-servant-app | Db.hs | | Init db service ( using mock one for prototype )
module App.DI.Db
( Db(..)
, initDb
) where
import App.DI.Db.MockDb
import Server.Save qualified as Save
import Server.GetMessage qualified as GetMessage
import Server.ListTag qualified as ListTag
import Types
-- | All DB interfaces by method
data Db = Db
{... | null | https://raw.githubusercontent.com/anton-k/reader-pattern-servant-app/05b9ae841221057d8dab38bf2eaa2babb3410973/app/App/DI/Db.hs | haskell | | All DB interfaces by method | | Init db service ( using mock one for prototype )
module App.DI.Db
( Db(..)
, initDb
) where
import App.DI.Db.MockDb
import Server.Save qualified as Save
import Server.GetMessage qualified as GetMessage
import Server.ListTag qualified as ListTag
import Types
data Db = Db
{ save :: Save.Db
, getMes... |
088d712e24ae7597e40a60635822b9b4fca3c3f781df7e655d4c68b7e29925c8 | wlitwin/graphv | graphv_core.ml | module Context = Context
type arg = Gles.gl
module IPath = Path
module Align = Align
module BlendFactor = BlendFactor
module Bounds = Bounds
module Color = Color
module CreateFlags = CreateFlags
module CompositeOperation = CompositeOperation
module CompositeOperationState = CompositeOperationState
module ImageFlags =... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/gles2/graphv/graphv_core.ml | ocaml | Convert color array to byte array
let point = DynArray.steal t.cache.points Point.empty in
Point.reset point x y flags;
Power basis
flatness measure
Swap flags
Handle degenerate cases
This calc is good
Update bounds
Align.or_ Align.left Align.baseline
Calculate extrusions
these are r... | module Context = Context
type arg = Gles.gl
module IPath = Path
module Align = Align
module BlendFactor = BlendFactor
module Bounds = Bounds
module Color = Color
module CreateFlags = CreateFlags
module CompositeOperation = CompositeOperation
module CompositeOperationState = CompositeOperationState
module ImageFlags =... |
c156bd815cd2a771442a96df9200b3c87a044b37045cb8b6ee7543576a19c827 | gfredericks/forty-two | forty_two.clj | (ns com.gfredericks.test.forty-two
(:use clojure.test
com.gfredericks.forty-two))
(deftest words-test
(are [n s] (= s (words n))
0 "zero"
1 "one"
6 "six"
10 "ten"
11 "eleven"
18 "eighteen"
20 "twenty"
22 "twenty-two"
99 "ninety-nine"
100... | null | https://raw.githubusercontent.com/gfredericks/forty-two/cd3b2ae25ad400788c8c128e2dffdb2d55f132d6/test/com/gfredericks/test/forty_two.clj | clojure | (ns com.gfredericks.test.forty-two
(:use clojure.test
com.gfredericks.forty-two))
(deftest words-test
(are [n s] (= s (words n))
0 "zero"
1 "one"
6 "six"
10 "ten"
11 "eleven"
18 "eighteen"
20 "twenty"
22 "twenty-two"
99 "ninety-nine"
100... | |
860e6c6f4834f1f203af694ea841652b64b373aea82820ea33037910df3013c4 | Mikolaj/horde-ad | OptimizerTools.hs | # LANGUAGE TypeFamilies #
-- | Tools for implementing (and debugging the use of) gradient descent schemes.
module HordeAd.External.OptimizerTools
( updateWithGradient
, gradientIsNil, minimumGradient, maximumGradient
, ArgsAdam(..), defaultArgsAdam
, StateAdam(..), initialStateAdam
, liftMatrix43, updateWithG... | null | https://raw.githubusercontent.com/Mikolaj/horde-ad/993ae8b4750a46f2e78b8a94e9eeb5abd9b1d46d/src/HordeAd/External/OptimizerTools.hs | haskell | | Tools for implementing (and debugging the use of) gradient descent schemes.
eval didn't update it, would crash
eval didn't update it, would crash
eval didn't update it, would crash
The defaults taken from
iteration count
fast allright
| Application of a vector function on the flattened matrices elements.
s... | # LANGUAGE TypeFamilies #
module HordeAd.External.OptimizerTools
( updateWithGradient
, gradientIsNil, minimumGradient, maximumGradient
, ArgsAdam(..), defaultArgsAdam
, StateAdam(..), initialStateAdam
, liftMatrix43, updateWithGradientAdam
) where
import Prelude
import Control.Monad.ST.Strict (... |
44711cf1e901e21b0444ba17567879994191f7736cc389252152f300bf42af98 | aeolus-project/zephyrus | json_versions_t.ml | (* Auto-generated from "json_versions.atd" *)
type version = int
type versioned_object = { version: version }
| null | https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/atd/json_versions_t.ml | ocaml | Auto-generated from "json_versions.atd" |
type version = int
type versioned_object = { version: version }
|
2ef345d500d831187ccb9a0f2586bb67c93f8101c1b8a9fdbe906f48d09642b6 | llelf/prose | Katakana.hs | -- generated by derive.hs
module Prose.Internal.Katakana where
katakana = [
['\x3031'..'\x3035'],
['\x309B'..'\x309C'],
['\x30A0'],
['\x30A1'..'\x30FA'],
['\x30FC'..'\x30FE'],
['\x30FF'],
['\x31F0'..'\x31FF'],
['\x32D0'..'\x32FE'],
['\x3300'..'\x3357'],
['\xFF66'..'\xFF6F'],
... | null | https://raw.githubusercontent.com/llelf/prose/ee32bef5cc7af41265ede92406943a5e2a60d530/Prose/Internal/Katakana.hs | haskell | generated by derive.hs | module Prose.Internal.Katakana where
katakana = [
['\x3031'..'\x3035'],
['\x309B'..'\x309C'],
['\x30A0'],
['\x30A1'..'\x30FA'],
['\x30FC'..'\x30FE'],
['\x30FF'],
['\x31F0'..'\x31FF'],
['\x32D0'..'\x32FE'],
['\x3300'..'\x3357'],
['\xFF66'..'\xFF6F'],
['\xFF70'],
['\xFF71'.... |
3d122017ac592c3722f9707776fad19c59bded4b1c06fc218622302ad77255f2 | isovector/ld52 | Arrow.hs | module Game.Objects.Arrow where
import Game.Common
arrow :: V2 WorldPos -> Double -> Object
arrow pos deg
= staticCollisionObject pos ore mempty
$ \p -> drawGameTextureOriginRect ArrowTexture (coerce ore) p deg (pure False)
where
ore = mkCenterdOriginRect 24
| null | https://raw.githubusercontent.com/isovector/ld52/a53bf6071cdd44628fc1af2a63eb26b37d1747d0/src/Game/Objects/Arrow.hs | haskell | module Game.Objects.Arrow where
import Game.Common
arrow :: V2 WorldPos -> Double -> Object
arrow pos deg
= staticCollisionObject pos ore mempty
$ \p -> drawGameTextureOriginRect ArrowTexture (coerce ore) p deg (pure False)
where
ore = mkCenterdOriginRect 24
| |
ffc82294d925e18e6be071ccd37a2f5189959a5f590013f12931dfbd58cd42ee | albertov/bindings-gdal | Warper.hs | module GDAL.Warper (
ResampleAlg (..)
, WarpOptions
, BandOptions (..)
, GDALWarpException (..)
, HasResampleAlg (..)
, HasMemoryLimit (..)
, HasWorkingDataType (..)
, HasCutline (..)
, HasCutlineBlendDist (..)
, HasSrcSrs (..)
, HasDstSrs (..)
, HasDstAlphaBand (..)
, HasSrcAlphaBand (..)
... | null | https://raw.githubusercontent.com/albertov/bindings-gdal/f91087e06a569fc6dc81b4c22e58b5c9a1dcdc73/src/GDAL/Warper.hs | haskell | module GDAL.Warper (
ResampleAlg (..)
, WarpOptions
, BandOptions (..)
, GDALWarpException (..)
, HasResampleAlg (..)
, HasMemoryLimit (..)
, HasWorkingDataType (..)
, HasCutline (..)
, HasCutlineBlendDist (..)
, HasSrcSrs (..)
, HasDstSrs (..)
, HasDstAlphaBand (..)
, HasSrcAlphaBand (..)
... | |
20ddc40f637b5bb3d352238c692450678e942b400dcca5b2b9527e7f41b48268 | mfikes/fifth-postulate | ns250.cljs | (ns fifth-postulate.ns250)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns250.cljs | clojure | (ns fifth-postulate.ns250)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
467cc072731281e5801eb30f03430ba54db3537babfc2bd6d75c25eafd256985 | qkrgud55/ocamlmulti | format.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib/format.mli | 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 GNU Library General Public License , with
$ I d : format.mli 12906 2012 - 09 -... |
3f9fa165c4653061195017189700527eaad429b924c93ac0b1e0513cdce647c0 | amosr/folderol | Conduit.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
module Bench.Correlation.Conduit where
import Bench.Correlation.Base
import qualified Data.Conduit as C
import qualified Data.Conduit.List as CL
import Bench.Plumbing.Foldl
import Bench.Plumbing.Conduit
priceOverTime :: FilePath -> IO Double
priceOverTime ... | null | https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/bench/Bench/Correlation/Conduit.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE BangPatterns # | module Bench.Correlation.Conduit where
import Bench.Correlation.Base
import qualified Data.Conduit as C
import qualified Data.Conduit.List as CL
import Bench.Plumbing.Foldl
import Bench.Plumbing.Conduit
priceOverTime :: FilePath -> IO Double
priceOverTime fpStock = C.runConduit c
where
c = sourceRecords fpStoc... |
51ac9d08246d4a2213d11d00ac6320fafa4e2a7888eb0e405842ecaf889b54cc | ijvcms/chuanqi_dev | player_monster_merge_db.erl | %%%-------------------------------------------------------------------
@author apple
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 30 . 十一月 2015 14:11
%%%-------------------------------------------------------------------
-module(player_monster_merge_db).
-include("common.hrl").
-include("cache.hrl")... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/active_merge/player_monster_merge_db.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
====================================================================
API | @author apple
( C ) 2015 , < COMPANY >
Created : 30 . 十一月 2015 14:11
-module(player_monster_merge_db).
-include("common.hrl").
-include("cache.hrl").
-export([
select_row/1,
select_all/1,
insert/1,
update/2,
delete/1
]).
select_row({MonsterId, PlayerId}) ->
case db:select_row(player_monster_merge, reco... |
9a7c652cdc4c9ec595150a215728b8252ed3257d125439a5d7e44744e92f4101 | mortuosplango/frankentone | patterns.clj | Heavily inspired by Tidal .
(ns frankentone.patterns
(:use [frankentone instruments utils]
[frankentone.entropy selfmod]
[clojure walk]
[overtone.music pitch time rhythm])
(:require [frankentone.entropy entropy]))
(declare play-pattern)
(def tempoclock (metronome 128))
(def || :|)
... | null | https://raw.githubusercontent.com/mortuosplango/frankentone/6602e9623c23f3543b9f779fea7851a043ad7fca/src/frankentone/patterns.clj | clojure | send the string as optional argument to the
submaps and play-pattern those
cycle through the collections
play only if the values of all known keys except
:inst are numbers or strings
i. e. everything else causes a break
if just collection
playable?
check if pattern works | Heavily inspired by Tidal .
(ns frankentone.patterns
(:use [frankentone instruments utils]
[frankentone.entropy selfmod]
[clojure walk]
[overtone.music pitch time rhythm])
(:require [frankentone.entropy entropy]))
(declare play-pattern)
(def tempoclock (metronome 128))
(def || :|)
... |
160b5b6d78233c4ffa58fa935e16a9fe98516a7978bf91be66b107a64c99cda3 | backtracking/mlpost | xdot_ast.ml | type statement =
| Graph of (string * string) list
| Node of int * (string * string) list
| Edge of int * int * (string * string) list
type file = statement option list
type point = float * float
type path = point list
type node = int * point
type edge = int * int * path
type digraph = {
bounding_box : po... | null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/contrib/dot/xdot_ast.ml | ocaml | type statement =
| Graph of (string * string) list
| Node of int * (string * string) list
| Edge of int * int * (string * string) list
type file = statement option list
type point = float * float
type path = point list
type node = int * point
type edge = int * int * path
type digraph = {
bounding_box : po... | |
30fd882ff5874ba71caf52cef4f985db64ca7298f7afde819ce3d379547cacb2 | expipiplus1/vulkan | Segment.hs | {-# language DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module Write.Segment
where
import Data.Functor
import Data.Vector ( Vector )
import Prelude
data Segment i a = Segment i (Vector a)
deriving (Functor, Foldable, Traversable, Show)
| null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/src/Write/Segment.hs | haskell | # language DeriveFunctor, DeriveFoldable, DeriveTraversable # | module Write.Segment
where
import Data.Functor
import Data.Vector ( Vector )
import Prelude
data Segment i a = Segment i (Vector a)
deriving (Functor, Foldable, Traversable, Show)
|
64cc1aef08a51756679c3d5633ef80aaac2ae6fb435cc802e15e28d0da837509 | pfdietz/ansi-test | find-class.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu May 29 07:15:06 2003
;;;; Contains: Tests of FIND-CLASS
;; find-class is also tested in numerous other places.
(deftest find-class.1
(loop for name in *cl-types-that-are-classes-symbols*
unless (eq (find-class name) (find-class name))
colle... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/objects/find-class.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of FIND-CLASS
find-class is also tested in numerous other places.
Need tests of assignment to (FIND-CLASS ...)
Add tests of:
Setting class to itself
Changing class to a different class
Changing to NIL (and that the class object stays around)
Check that find-class i... | Author :
Created : Thu May 29 07:15:06 2003
(deftest find-class.1
(loop for name in *cl-types-that-are-classes-symbols*
unless (eq (find-class name) (find-class name))
collect name)
nil)
(deftest find-class.2
(loop for name in *cl-types-that-are-classes-symbols*
unless (eq ... |
3da36e5909963fc71c2273732e82edff62a511b7687b6204b2339e5b35295317 | YoshikuniJujo/test_haskell | Main.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Control.Monad
import Control.Concurrent
import Data.List
import System.Random hiding (next)
main :: IO ()
main = snow 80 50 1 500000 []
snow :: Int -> Int -> Int -> Int -> [String] -> IO ()
snow w h n spd ls = do
threadDelay spd
ls' <- frame w h n ... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/538d9f79ab71d31855de6e1a4569e13d43739d59/tribial/try-snow/app/Main.hs | haskell | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Control.Monad
import Control.Concurrent
import Data.List
import System.Random hiding (next)
main :: IO ()
main = snow 80 50 1 500000 []
snow :: Int -> Int -> Int -> Int -> [String] -> IO ()
snow w h n spd ls = do
threadDelay spd
ls' <- frame w h n ... | |
d89a96974ed09b8b01e2e3573ced6a3381c0d27a3ed899f082a1d0064a9e62eb | samply/blaze | test_util.clj | (ns blaze.interaction.test-util
(:require
[blaze.async.comp :as ac]
[blaze.handler.util :as handler-util]))
(defn wrap-error [handler]
(fn [request]
(-> (handler request)
(ac/exceptionally handler-util/error-response))))
| null | https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/interaction/test/blaze/interaction/test_util.clj | clojure | (ns blaze.interaction.test-util
(:require
[blaze.async.comp :as ac]
[blaze.handler.util :as handler-util]))
(defn wrap-error [handler]
(fn [request]
(-> (handler request)
(ac/exceptionally handler-util/error-response))))
| |
b5796fb8ae28e30090e00c9e73deb9845d4d94675872a4a212b69aad7e093ff0 | Kalimehtar/gir | object.rkt | #lang racket/base
(require "contract.rkt")
(provide (contract-out (build-object ffi-builder?))
build-object-ptr _gobject gtype->ffi set!-set-properties! set!-get-properties)
(require "loadlib.rkt" "base.rkt" ffi/unsafe ffi/unsafe/alloc "function.rkt" "translator.rkt" "gtype.rkt"
racket/match (prefix... | null | https://raw.githubusercontent.com/Kalimehtar/gir/a9854262a438070334cfd8ff98cb86dd3803d7e3/gir/object.rkt | racket | will be defined in property.rkt | #lang racket/base
(require "contract.rkt")
(provide (contract-out (build-object ffi-builder?))
build-object-ptr _gobject gtype->ffi set!-set-properties! set!-get-properties)
(require "loadlib.rkt" "base.rkt" ffi/unsafe ffi/unsafe/alloc "function.rkt" "translator.rkt" "gtype.rkt"
racket/match (prefix... |
5f8b42ba56239b03615fb55b9596c3fda94be0296bccf856226253ab22d342f3 | cedlemo/OCaml-GI-ctypes-bindings-generator | Settings_bind_flags.ml | open Ctypes
open Foreign
type t = Default | Get | Set | No_sensitivity | Get_no_changes | Invert_boolean
type t_list = t list
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Default
else if v = Unsigned.UInt32.of_int 1 then Get
else if v = Unsigned.UInt32.of_int 2 then Set
else if v = Unsigned.UInt32.of... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/Settings_bind_flags.ml | ocaml | open Ctypes
open Foreign
type t = Default | Get | Set | No_sensitivity | Get_no_changes | Invert_boolean
type t_list = t list
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Default
else if v = Unsigned.UInt32.of_int 1 then Get
else if v = Unsigned.UInt32.of_int 2 then Set
else if v = Unsigned.UInt32.of... | |
7a8ba224726954599808c128d848e3f830b29111aba0b57b625d5d44d1b9135e | 8c6794b6/haskell-sc-scratch | Trie01.hs | |
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : portable
Scratch written while reading :
* TypeCase : A Design Pattern for Type - Indexed Functions
Trie with smart data type .
Module : $Header$
CopyRight : (c) 8c6794b6
Li... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/FP/TypeCase/Trie01.hs | haskell | |
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : portable
Scratch written while reading :
* TypeCase : A Design Pattern for Type - Indexed Functions
Trie with smart data type .
Module : $Header$
CopyRight : (c) 8c6794b6
Li... | |
fb97e55da857cd347775276548ceee293491191a0ecf56f9e9afde7366fdf42c | athos/kitchen-async | project.clj | (defproject puppeteer-example "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[kitchen-async "0.1.0-SNAPSHO... | null | https://raw.githubusercontent.com/athos/kitchen-async/1f28eab4ef7126e0b8b6fd8d8887beeab7430fea/examples/puppeteer-example/project.clj | clojure | (defproject puppeteer-example "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[kitchen-async "0.1.0-SNAPSHO... | |
362731eb69d8b519242a2592af2aa945b6bd7c462a9e1e73174f9701a47b9073 | d-cent/mooncake | config.clj | (ns mooncake.js.config
(:require [environ.core :as env]))
(defmacro polling-interval-ms []
(or (:polling-interval env/env) 8000))
| null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src-cljs/mooncake/js/config.clj | clojure | (ns mooncake.js.config
(:require [environ.core :as env]))
(defmacro polling-interval-ms []
(or (:polling-interval env/env) 8000))
| |
76f6ee41b1c467f5d0bc74daae583f65f4f02e3a89179edefd6e7fa0b3c4e88e | fpco/schoolofhaskell.com | Dashboard.hs | module Handler.Dashboard where
import Import
getDashboardR :: Handler Html
getDashboardR = do
Entity _ profile <- requireProfile
redirect $ UserR $ profileHandle profile
| null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Handler/Dashboard.hs | haskell | module Handler.Dashboard where
import Import
getDashboardR :: Handler Html
getDashboardR = do
Entity _ profile <- requireProfile
redirect $ UserR $ profileHandle profile
| |
e9833286ab6e31d1113bbc334ecc0daab4e7f392436acc02ce7b9a62db9b072b | emanjavacas/cosycat | db.cljs | (ns cosycat.admin.components.db
(:require [re-frame.core :as re-frame]
[react-bootstrap.components :as bs]
[cosycat.localstorage :refer [dump-db fetch-last-dump get-backups]]
[taoensso.timbre :as timbre]))
(defn ls-dump []
[bs/button {:on-click dump-db} "Dump to LocalStorage"])
... | null | https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/admin/components/db.cljs | clojure | (ns cosycat.admin.components.db
(:require [re-frame.core :as re-frame]
[react-bootstrap.components :as bs]
[cosycat.localstorage :refer [dump-db fetch-last-dump get-backups]]
[taoensso.timbre :as timbre]))
(defn ls-dump []
[bs/button {:on-click dump-db} "Dump to LocalStorage"])
... | |
d0e94767304f82995f12af550216b554c483f06ffeb1f2563349128bc5b183f4 | mzero/6502 | CPU.hs | module CPU
( S(..), powerOnState
, St
, zeroPage
, bitN, bitV, bitD, bitI, bitZ, bitC
, assignBit
, assignZN
, setZN, setAZN, setXZN, setYZN
, setZVNbit, setACZVN, setCZN
, fetch, store
, clearBus
, fetchIndirectAddr
, nextPC, fetchPC
, push, pull, pushAddr, pull... | null | https://raw.githubusercontent.com/mzero/6502/e441dbda281c73a408e2d5a48ce8917c8a599c80/CPU.hs | haskell | correct! no page crossing allowed | module CPU
( S(..), powerOnState
, St
, zeroPage
, bitN, bitV, bitD, bitI, bitZ, bitC
, assignBit
, assignZN
, setZN, setAZN, setXZN, setYZN
, setZVNbit, setACZVN, setCZN
, fetch, store
, clearBus
, fetchIndirectAddr
, nextPC, fetchPC
, push, pull, pushAddr, pull... |
adf08359c42d4b774391681627722553baa24977875dceccb6e4d317e52415de | BranchTaken/Hemlock | test_bit_and_bit_or_bit_xor.ml | open! Basis.Rudiments
open! Basis
open I64
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_{and,or,xor} "
|> fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " "
|> fmt ~al... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/i64/test_bit_and_bit_or_bit_xor.ml | ocaml | open! Basis.Rudiments
open! Basis
open I64
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_{and,or,xor} "
|> fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " "
|> fmt ~al... | |
3fc28d4677f4828599509d6444c59e1cb7f5881be947f82434ae56728e4a2041 | TrustInSoft/tis-interpreter | integer.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/stdlib/integer.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
539b51541d5cdcd02c97e5f47e74b4b4debc0a2a80b8261577880815f8c1e6a2 | dleslie/allegro-egg | image.scm | (cond-expand
(has-allegro-image
(register-feature! 'allegro-image)
#>
#include <allegro5/allegro_image.h>
<#
(define image-addon-install (foreign-lambda bool "al_init_image_addon"))
(define image-addon-uninstall (foreign-lambda void "al_shutdown_image_addon"))
(define image-addon-version (foreign-lam... | null | https://raw.githubusercontent.com/dleslie/allegro-egg/0435fb891dda5c64e95aa9dedccddd31b17e27da/image.scm | scheme | (cond-expand
(has-allegro-image
(register-feature! 'allegro-image)
#>
#include <allegro5/allegro_image.h>
<#
(define image-addon-install (foreign-lambda bool "al_init_image_addon"))
(define image-addon-uninstall (foreign-lambda void "al_shutdown_image_addon"))
(define image-addon-version (foreign-lam... | |
3e87eaa25d328abea8e09aa4615faaaca2917415838bf6cefa08faacea1bde0e | taylorwood/advent-of-code | 13.clj | (ns advent-of-code.2018.13
(:require [advent-of-code.elves :refer :all]))
(def lines (day->input-lines 2018 13))
(def default-cart
(with-meta {:position [0 0]}
{:turns (cycle [:left :straight :right])}))
(def char->cell
{\space :empty
\| :vertical
\/ :diagonal-right
\\ :diagonal-left
... | null | https://raw.githubusercontent.com/taylorwood/advent-of-code/c6b08f4b618875a45c8083a04ae2c669626c43bf/src/advent_of_code/2018/13.clj | clojure | viz | (ns advent-of-code.2018.13
(:require [advent-of-code.elves :refer :all]))
(def lines (day->input-lines 2018 13))
(def default-cart
(with-meta {:position [0 0]}
{:turns (cycle [:left :straight :right])}))
(def char->cell
{\space :empty
\| :vertical
\/ :diagonal-right
\\ :diagonal-left
... |
d66c0a9650362748e82f77a32ed4b8bb558e91c6851d091f45d53af6ff7525d6 | nikita-volkov/rebase | Yoneda.hs | module Rebase.Data.Profunctor.Yoneda
(
module Data.Profunctor.Yoneda
)
where
import Data.Profunctor.Yoneda
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Profunctor/Yoneda.hs | haskell | module Rebase.Data.Profunctor.Yoneda
(
module Data.Profunctor.Yoneda
)
where
import Data.Profunctor.Yoneda
| |
9ee314938e70e5c9c8f18ca5b6336c672d306b8011a265f5fdcb1e442289c95b | themoritz/diener | Model.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes ... | null | https://raw.githubusercontent.com/themoritz/diener/31f7de2a2d8a8dedcd117a8f69a2f0a993a64ee2/example-persistent/src/Model.hs | haskell | # LANGUAGE EmptyDataDecls #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell # | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Model where
import Database.Gerippe (toSqlKey)
import Database.Persist.TH
import ... |
5c13e401eb417345548fa841a75f81c5b5222a12234eb91c5f6d2a1c40c7d78e | IvanIvanov/fp2013 | close-to-mean.scm | (define (accumulate op initial items)
(if (null? items)
initial
(accumulate op (op initial (car items)) (cdr items))))
(define (filter pred items)
(cond ((null? items) '())
((pred (car items))
(cons (car items) (filter pred (cdr items))))
(else (filter pred (cdr items)))))
(de... | null | https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab1/homework5/close-to-mean.scm | scheme | (define (accumulate op initial items)
(if (null? items)
initial
(accumulate op (op initial (car items)) (cdr items))))
(define (filter pred items)
(cond ((null? items) '())
((pred (car items))
(cons (car items) (filter pred (cdr items))))
(else (filter pred (cdr items)))))
(de... | |
507e7311ccc6ad1162141d4e401c5a884ca8a94cf434de2215baf9fab0a3042f | haskell-opengl/OpenGLRaw | SamplerObjects.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.SamplerObjects
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-----------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/SamplerObjects.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.SamplerObjects
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Function... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.SamplerObjects (
glGetARBSamplerObjects,
gl_ARB_sampler_objects,
pattern GL_SAMPLER_BINDING,
glBindSampler,
glDeleteSamplers,
glGenSamplers,
glGetSamplerParameterIiv,
glGetSamplerParameterIuiv,... |
47bba59162f48cf57a7e26b8fb856497a38013d1d8fcbf0bb839e278d9cbcf69 | SimulaVR/godot-haskell | ResourceImporter.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.ResourceImporter () where
import Data.Coerce
import Foreign... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/ResourceImporter.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.ResourceImporter () where
import Data.Coerce
import Foreign... | |
be63dc88ad5571974c424b054a7e2f637d2a700b364fefe1a2be092c697ae26f | project-oak/hafnium-verification | Clang.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/integration/Clang.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
b666cd71fcab64d6c4dec7cab1a915743bf72710773de112db1015979713dac8 | clojure-interop/java-jdk | BasicPopupMenuSeparatorUI.clj | (ns javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
"A Basic L&F implementation of PopupMenuSeparatorUI. This implementation
is a \"combined\" view/controller."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.basic BasicPopupMenuSeparatorUI]))
(defn ->basic-popup-menu-separator-ui... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.clj | clojure | (ns javax.swing.plaf.basic.BasicPopupMenuSeparatorUI
"A Basic L&F implementation of PopupMenuSeparatorUI. This implementation
is a \"combined\" view/controller."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.basic BasicPopupMenuSeparatorUI]))
(defn ->basic-popup-menu-separator-ui... | |
1c380eb5cf1f6238e0e32ce1bbd4c2e2182d3d047d9f6acfb98ecbe561a63ac3 | 1HaskellADay/1HAD | Exercise.hs | module HAD.Y2014.M04.D10.Exercise where
{- | onBothSide
Apply the same argument on both side of a binary numeric function.
The only interesting solution is point-free.
It IS the easiest exercise so far, with the shortest solution.
Examples:
prop> onBothSide (+) x = x + x
prop> onBothSide (*) x =... | null | https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M04/D10/Exercise.hs | haskell | | onBothSide
Apply the same argument on both side of a binary numeric function.
The only interesting solution is point-free.
It IS the easiest exercise so far, with the shortest solution.
Examples:
prop> onBothSide (+) x = x + x
prop> onBothSide (*) x = x * x
| module HAD.Y2014.M04.D10.Exercise where
onBothSide :: Num a => (a -> a -> b) -> a -> b
onBothSide = undefined
|
23c0794165c46337099576b6d42a71c554f7acad1810b4b70e5d6de76eec6cf9 | disteph/cdsat | TopFlags.ml | (* This module is the control panel to run the program with different options *)
(* Psyche flags *)
let sizesort = ref true (* Sorts input files by size *)
let fname = ref ([]:string list) (* List of files or directories to treat *)
let clear4each = ref true (* Clears structures, including table of learned... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/top-level/TopFlags.ml | ocaml | This module is the control panel to run the program with different options
Psyche flags
Sorts input files by size
List of files or directories to treat
Clears structures, including table of learned lemmas,
between each problem
Skips instances expected to be sat
Skips instanc... |
let dtags : (string*int*bool) list ref
|
b77ad099c1f699662a2e558c8f445acd8fd2e149592132ce5688afd00afe2d84 | stchang/macrotypes | stlc+cons.rkt | #lang turnstile/base
(extends "stlc+reco+var.rkt")
;; Simply-Typed Lambda Calculus, plus cons
;; Types:
- types from stlc+reco+var.rkt
;; - List constructor
;; Terms:
- terms from stlc+reco+var.rkt
TODO : enable HO use of list primitives
(provide (type-out List)
nil isnil cons list head tail
... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/stlc%2Bcons.rkt | racket | Simply-Typed Lambda Calculus, plus cons
Types:
- List constructor
Terms:
minimal type inference
has expected type
no expected type | #lang turnstile/base
(extends "stlc+reco+var.rkt")
- types from stlc+reco+var.rkt
- terms from stlc+reco+var.rkt
TODO : enable HO use of list primitives
(provide (type-out List)
nil isnil cons list head tail
reverse length list-ref member)
(define-type-constructor List)
(define-typed-syntax... |
4609dea06f23b14ca0f52f0072f0d980d2a1d6d3cf6ceb4e4e3bd99fbdf43801 | racket/racket7 | evt.rkt | #lang racket/base
(require "test-util.rkt")
(parameterize ([current-contract-namespace
(make-basic-contract-namespace)])
(test/pos-blame
'evt/c-first-order-1
'(contract (evt/c) 5 'pos 'neg))
(test/spec-passed
'evt/c-first-order-2
'(contract (evt/c) always-evt 'pos 'neg))
(test/spec-... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/pkgs/racket-test/tests/racket/contract/evt.rkt | racket | return arity test | #lang racket/base
(require "test-util.rkt")
(parameterize ([current-contract-namespace
(make-basic-contract-namespace)])
(test/pos-blame
'evt/c-first-order-1
'(contract (evt/c) 5 'pos 'neg))
(test/spec-passed
'evt/c-first-order-2
'(contract (evt/c) always-evt 'pos 'neg))
(test/spec-... |
3e7c5dbdc02d73d13198f2a0ba0cb5ab2b8f7bcb6bdd478a66b7abcdc28cfc52 | dongcarl/guix | poedit.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 < >
Copyright © 2019 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 ; ... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/poedit.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2019 < >
Copyright © 2019 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages poedit)
#:use-module ((guix licenses) #:prefix license:... |
68fe80700e9add77c89da75022190f7e550dd6c53e2eff5faf8400e875ec1c49 | softwarelanguageslab/maf | R5RS_various_mceval-2.scm | ; Changes:
* removed : 3
* added : 8
* swaps : 7
* negated predicates : 1
* swapped branches : 4
* calls to i d fun : 20
(letrec ((self-evaluating? (lambda (exp)
(<change>
@sensitivity:FA
(if (number? exp) #t (if (s... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_mceval-2.scm | scheme | Changes: | * removed : 3
* added : 8
* swaps : 7
* negated predicates : 1
* swapped branches : 4
* calls to i d fun : 20
(letrec ((self-evaluating? (lambda (exp)
(<change>
@sensitivity:FA
(if (number? exp) #t (if (string? exp)... |
b6f4a69afee1b70feb6f953b91d11e2ab6b2e0254de82d5adeade20ecddee1ae | ghc/packages-ghc-prim | Classes.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude , MagicHash , StandaloneDeriving , BangPatterns #
# OPTIONS_GHC -fno - warn - unused - imports #
-- XXX -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh.
{-# OPTIONS_HADDOCK hide #-}
---------------------------------------------------------------... | null | https://raw.githubusercontent.com/ghc/packages-ghc-prim/ad9bf96815cb5a9bb4acc51c99eff20be3e50da3/GHC/Classes.hs | haskell | XXX -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh.
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Basic classes.
-------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude , MagicHash , StandaloneDeriving , BangPatterns #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : GHC.Classes
Copyright : ( c ) The University of Glasgow , 1992 - 2002
Portability : non - portable ( GHC extensions )
module GHC.Classes w... |
55a161a514d2dc750ce92e97a7a6bce27d692993055190ed4a6a1a32a525b48c | kadena-io/chainweaver | Helpers.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
| Little helpers useful for implementing widgets .
module Frontend.UI.Widgets.Helpers
( imgWithAlt
, imgWithAltCls
, tabPane
, tabPane'
, makeClickable... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/d617987d7cc7e87ade3e58498450cfe5218278d3/frontend/src/Frontend/UI/Widgets/Helpers.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Shamelessly stolen (and adjusted) from reflex-dom-contrib... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
| Little helpers useful for implementing widgets .
module Frontend.UI.Widgets.Helpers
( imgWithAlt
, imgWithAltCls
, tabPane
, tabPane'
, makeClickable
, setFocus
, setFocusOn
, se... |
958e1e210ad7c189da3bdf3a4dbc795320d73d6a2f8894f2c55f9f4df72c903e | slyrus/abcl | member-if.lisp | ;;; member-if.lisp
;;;
Copyright ( C ) 2003
$ Id$
;;;
;;; 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 version .
;;;
;... | null | https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/member-if.lisp | lisp | member-if.lisp
This program is free software; you can redistribute it and/or
either version 2
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 General Public License ... | Copyright ( C ) 2003
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
(in-pack... |
c299908a895e43edef169f67d16473a7ef990c00b097db440521daa8a6b0c1b0 | Mishio595/disml | opcode.ml | open Core
type t =
| DISPATCH
| HEARTBEAT
| IDENTIFY
| STATUS_UPDATE
| VOICE_STATE_UPDATE
| RESUME
| RECONNECT
| REQUEST_GUILD_MEMBERS
| INVALID_SESSION
| HELLO
| HEARTBEAT_ACK
exception Invalid_Opcode of int
let to_int = function
| DISPATCH -> 0
... | null | https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/gateway/opcode.ml | ocaml | open Core
type t =
| DISPATCH
| HEARTBEAT
| IDENTIFY
| STATUS_UPDATE
| VOICE_STATE_UPDATE
| RESUME
| RECONNECT
| REQUEST_GUILD_MEMBERS
| INVALID_SESSION
| HELLO
| HEARTBEAT_ACK
exception Invalid_Opcode of int
let to_int = function
| DISPATCH -> 0
... | |
70766598a8473291d11c19f9cbab412e11d0a1b40b1bfe375bb1326a4b33a05e | markbastian/clojure-north-2020 | x03_hero_data.clj | # # Create the Primary Hero Data Set
;;
;; We are going to parse the kaggle files found at the following links:
;;
;; * [Super Heroes Dataset](-set)
containing two files :
* heroes_information.csv : Basic information on over 700 superheroes
;; * super_hero_powers.csv: Powers attached to all superheroes.
;... | null | https://raw.githubusercontent.com/markbastian/clojure-north-2020/084a7af30c08a3cabefe1314744f50edd8043c4a/src/clojure_north_2020/ch01_data/x03_hero_data.clj | clojure |
We are going to parse the kaggle files found at the following links:
* [Super Heroes Dataset](-set)
* super_hero_powers.csv: Powers attached to all superheroes.
* -superhero-dataset
is inherently a DSL for data. Data is generally loaded straight from a file,
normalized into a desired format, and worked w... | # # Create the Primary Hero Data Set
containing two files :
* heroes_information.csv : Basic information on over 700 superheroes
This exercise demonstrates the power of Clojure as a data - first language .
Many other languages have libraries or DSLs for processing data , but Clojure
(ns clojure-north-2020.... |
7639c4507af2005f9acfb7a04db63a3d876d4ba574a30effbfc1b658c6c550da | rd--/hsc3 | k2a.help.hs | -- k2a
k2a (whiteNoiseId 'α' kr * 0.3)
-- k2a ; compare
mce2 (k2a (whiteNoiseId 'α' kr * 0.3)) (whiteNoiseId 'β' ar * 0.1)
-- k2a
let freq = (mouseX kr 0.1 40 Exponential 0.2) / blockSize * sampleRate;
o1 = k2a (lfNoise0Id 'α' kr freq)
o2 = lfNoise0Id 'β' ar freq
in mce2 o1 o2 * 0.1
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/k2a.help.hs | haskell | k2a
k2a ; compare
k2a | k2a (whiteNoiseId 'α' kr * 0.3)
mce2 (k2a (whiteNoiseId 'α' kr * 0.3)) (whiteNoiseId 'β' ar * 0.1)
let freq = (mouseX kr 0.1 40 Exponential 0.2) / blockSize * sampleRate;
o1 = k2a (lfNoise0Id 'α' kr freq)
o2 = lfNoise0Id 'β' ar freq
in mce2 o1 o2 * 0.1
|
4e23bdfda9f4bcc29c2fc9f8f2e0232f3f743ebec8a1ee0e097d2611aa056dd4 | haskell/cabal | LinkedComponent.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
-- | See <-proposals/blob/backpack/proposals/0000-backpack.rst>
module Distribution.Backpack.LinkedComponent (
LinkedComponent(..),
lc_insts,
lc_uid,
lc_cid,
lc_pkgid,
toLinkedComponent,
toLinkedComponents,
dispLinkedComponent,
... | null | https://raw.githubusercontent.com/haskell/cabal/df6c22bd1a4c6d5bfdca782e3da56198a3c21ddc/Cabal/src/Distribution/Backpack/LinkedComponent.hs | haskell | | See <-proposals/blob/backpack/proposals/0000-backpack.rst>
| A linked component is a component that has been mix-in linked, at
which point we have determined how all the dependencies of the
component are explicitly instantiated (in the form of an OpenUnitId).
'ConfiguredComponent' is mix-in linked into 'LinkedCo... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Distribution.Backpack.LinkedComponent (
LinkedComponent(..),
lc_insts,
lc_uid,
lc_cid,
lc_pkgid,
toLinkedComponent,
toLinkedComponents,
dispLinkedComponent,
LinkedComponentMap,
extendLinkedComponentMap,
) where
im... |
f79c39b6bec18a1c0c318cf7f11fc39b0ac03bf1a88be3e2d193096a3c3e7044 | erlang/rebar3 | rebar_templater.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/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_templater.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... |
e08e64bc21efb2353b115aa5374179c8d7782682d5e95890aa10cbc24e154b57 | cndreisbach/clojure-web-dev-workshop | project.clj | (defproject we-owe "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring "1.1.8"]
[compojure "1.1.5"]
[hiccup "1.0.3"]
... | null | https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/03-hiccup/project.clj | clojure | (defproject we-owe "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring "1.1.8"]
[compojure "1.1.5"]
[hiccup "1.0.3"]
... | |
d1dca1cde81505fe5175b732a60ba4da36cd7e6972736fcf844318d46d037007 | AbstractMachinesLab/caramel | erl_ast_helper.ml | open Erl_ast
(* Helpers to work with Atoms *)
module Atom = struct
let is_keyword str =
match str with
| "not" | "and" | "or" | "div" | "rem" | "band" | "bor" | "bxor" | "bnot" | "bsl" | "bsr"->
true
| _ -> false
let quote str = "'" ^ str ^ "'"
let safe_quote str =
match str.[0] with
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/erlang/src/erl_ast_helper.ml | ocaml | Helpers to work with Atoms
Helpers to work with Names
Helpers to work with Literals
Helpers to work with Expressions
Helpers to work with Patterns
Helpers to work with Functions
Helpers to work with Types
Helpers to work with Modules | open Erl_ast
module Atom = struct
let is_keyword str =
match str with
| "not" | "and" | "or" | "div" | "rem" | "band" | "bor" | "bxor" | "bnot" | "bsl" | "bsr"->
true
| _ -> false
let quote str = "'" ^ str ^ "'"
let safe_quote str =
match str.[0] with
| 'a' .. 'z' -> if is_keyword s... |
a55a227102cb6d86ef3c989d93e995035aad4d3596c32a255d8b9f00474527f1 | ghc/ghc | B.hs | module B where
-- Refers to A from current unit
import A
foo = a2
| null | https://raw.githubusercontent.com/ghc/ghc/1c050ed26f50f3a8788e650f23d6ff55badc1072/testsuite/tests/driver/multipleHomeUnits/order-matters2/B.hs | haskell | Refers to A from current unit | module B where
import A
foo = a2
|
29466dfc3a1001eca0290a670cbbf887c2c03a9fd7f6059d7180b2507276332d | mathematical-systems/clml | dlassq.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlassq.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
cbd092642506af542570afb04252418dce2c450457a8eb9e47ccf01a8d2a4fde | igrishaev/farseer | project.clj | (defproject com.github.igrishaev/farseer-jetty "0.1.2-SNAPSHOT"
:description
"Jetty server for HTTP RPC handler"
:plugins [[lein-parent "0.3.8"]]
:parent-project
{:path "../project.clj"
:inherit [:deploy-repositories
:license
:managed-dependencies
:plugins
... | null | https://raw.githubusercontent.com/igrishaev/farseer/200f43af0a1260a7b274cfe277fdb504d0ea2a85/farseer-jetty/project.clj | clojure | (defproject com.github.igrishaev/farseer-jetty "0.1.2-SNAPSHOT"
:description
"Jetty server for HTTP RPC handler"
:plugins [[lein-parent "0.3.8"]]
:parent-project
{:path "../project.clj"
:inherit [:deploy-repositories
:license
:managed-dependencies
:plugins
... | |
cfd810538dfe0b1fdde913455abfaedb2755cb519c62280897886654451d551a | LeventErkok/sbv | AES.hs | -----------------------------------------------------------------------------
-- |
Module : TestSuite . Crypto . AES
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
Test suite for Documentation . SBV.Examples . Crypto . AES
-----------------------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Crypto/AES.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer:
Stability : experimental
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
Test suite | Module : TestSuite . Crypto . AES
Copyright : ( c )
Test suite for Documentation . SBV.Examples . Crypto . AES
module TestSuite.Crypto.AES(tests) where
import Data.SBV.Internals
import Documentation.SBV.Examples.Crypto.AES
import Utils.SBVTestFramework
tests :: TestTree
tests = testGroup "Crypto.AES" [... |
16e16213ab4842215b766a4d262a228772a6d7cf347b54c30c85c487dd43cb29 | mukul-rathi/bolt | good_let_declaration.ml | open Core
open Print_typed_ast
let%expect_test "Correct type annotation" =
print_typed_ast "
void main(){
let x : int = 1
}
" ;
[%expect
{|
Program
└──Main block
└──Type expr: Int
└──Expr: Let var: x
└──Type expr: Int
└──Expr: Int:1 |}]
| null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/typing/good_let_declaration.ml | ocaml | open Core
open Print_typed_ast
let%expect_test "Correct type annotation" =
print_typed_ast "
void main(){
let x : int = 1
}
" ;
[%expect
{|
Program
└──Main block
└──Type expr: Int
└──Expr: Let var: x
└──Type expr: Int
└──Expr: Int:1 |}]
| |
812a7e0961d63d7929ed37d8864abfde0a90ca8ec9c084bd92f161813cdac371 | triffon/fp-2019-20 | reverse-list.rkt | (define (reverse2 xs)
(if (or (null? xs) (= (length xs) 1)) xs
(append (reverse2 (cdr xs)) (list (car xs)))))
(reverse2 '())
(reverse2 '(1))
(reverse2 '(1 2 3))
(reverse2 '(1 5))
(reverse2 '(23 34 56 69 2))
;iterative
(define (reverse2-iter xs)
(define (reverse3 xs result)
(if (or (null? xs) (= (length... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-3/exercises/04.lists/solutions/reverse-list.rkt | racket | iterative | (define (reverse2 xs)
(if (or (null? xs) (= (length xs) 1)) xs
(append (reverse2 (cdr xs)) (list (car xs)))))
(reverse2 '())
(reverse2 '(1))
(reverse2 '(1 2 3))
(reverse2 '(1 5))
(reverse2 '(23 34 56 69 2))
(define (reverse2-iter xs)
(define (reverse3 xs result)
(if (or (null? xs) (= (length xs) 1)) (a... |
374cc56fa3f2008399977e87d8d91b30ddce79e562ebe3b454bbf9d91d2b0843 | mcorbin/meuse | frontend.clj | (ns meuse.auth.frontend
(:require [clj-time.core :as time]
[clj-time.coerce :as coerce]
[crypto.random :as random]
[exoscale.cloak :as cloak]
[meuse.db.public.user :as db-user]
[meuse.error :as error])
(:import java.util.Base64
javax.crypto.Ciph... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/auth/frontend.clj | clojure | (ns meuse.auth.frontend
(:require [clj-time.core :as time]
[clj-time.coerce :as coerce]
[crypto.random :as random]
[exoscale.cloak :as cloak]
[meuse.db.public.user :as db-user]
[meuse.error :as error])
(:import java.util.Base64
javax.crypto.Ciph... | |
d2995e3b213b3e85d5882ba86f2383f80f5467fdbf5afced96e6e070cfdfad8d | Simspace/avaleryar | Config.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Support for making load-time configuration values available at run-time.
module Language.Avaleryar.Native.Config
(
configDb
) where
import Control.Applicative
import Control.Monad.IO.Class
import Data.Foldable
import qualified Data.Map as Map
import Data.Text (Text)
i... | null | https://raw.githubusercontent.com/Simspace/avaleryar/dff6048312289f6b8500e60094d7835c78aa5d1e/extras/src/Language/Avaleryar/Native/Config.hs | haskell | # LANGUAGE OverloadedStrings #
| Support for making load-time configuration values available at run-time. |
module Language.Avaleryar.Native.Config
(
configDb
) where
import Control.Applicative
import Control.Monad.IO.Class
import Data.Foldable
import qualified Data.Map as Map
import Data.Text (Text)
import Language.Avaleryar.Syntax
import Language.Avaleryar.Semantics
configDb :: (Factual a, MonadIO m) => Maybe ... |
43d94a1314e0f6fa4cd294c0b41c832c2d2113eb48d97e0b3cc2bff9a14a6fed | 8c6794b6/hpc-codecov | test-main.hs | import qualified Test.Main
main :: IO ()
main = Test.Main.main
| null | https://raw.githubusercontent.com/8c6794b6/hpc-codecov/ad4f294cdb29766f828f7df171f7476ae111034b/test/test-main.hs | haskell | import qualified Test.Main
main :: IO ()
main = Test.Main.main
| |
0de25191af6d5f83fe4b3c365ff0015fe812246246092baa56bbe8a12a0aa6de | attila-lendvai/guix-crypto | lighthouse.scm | Copyright © 2022 < >
;;;
This file is part of guix - crypto , a channel for Guix .
;;;
;;; guix-crypto 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... | null | https://raw.githubusercontent.com/attila-lendvai/guix-crypto/e259f3bf1d1f51f250f8e754aa44a3ec770b4660/src/guix-crypto/services/lighthouse.scm | scheme |
guix-crypto is free software; you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
guix-crypto 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 PARTICU... | Copyright © 2022 < >
This file is part of guix - crypto , a channel for Guix .
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define-module (guix-crypto services lighthouse)
#:use-module (guix-crypto utils)
#:use-modul... |
d87e571b9ea37ddc374e7639b24ad1df8a81cf50c1a85718872af476040c2c4a | eugeneia/athens | package.lisp | trivia level2
(defpackage :trivia.level2
(:use :trivia.level1)
(:export :*or-pattern-allow-unshared-variables*
:match1 :guard1 :or1)
(:export :match2 :match2* ; primitives
:match2+ :match2*+
:generate-multi-matcher
;; external
:match :match*
:... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/trivia-20180711-git/level2/package.lisp | lisp | primitives
external
optimizer
for accessor arity check | trivia level2
(defpackage :trivia.level2
(:use :trivia.level1)
(:export :*or-pattern-allow-unshared-variables*
:match1 :guard1 :or1)
:match2+ :match2*+
:generate-multi-matcher
:match :match*
:ematch :ematch*
:cmatch :cmatch*
:match-er... |
fe3534c6613049784151c8218b06fb002074fcafbeed7f55b1d1cfc2c28c58e8 | chvanikoff/cowboy_session | cowboy_session.erl | -module(cowboy_session).
-author('chvanikoff <>').
%% API
-export([
start/0,
on_request/1,
get/2, get/3,
set/3,
expire/1,
touch/1
]).
-behaviour(application).
-export([start/2, stop/1]).
-behaviour(supervisor).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
-... | null | https://raw.githubusercontent.com/chvanikoff/cowboy_session/11950a69686c10c7dad5c5fe2f21f7af0d8cf816/src/cowboy_session.erl | erlang | API
===================================================================
API functions
===================================================================
===================================================================
Application callbacks
===================================================================
... | -module(cowboy_session).
-author('chvanikoff <>').
-export([
start/0,
on_request/1,
get/2, get/3,
set/3,
expire/1,
touch/1
]).
-behaviour(application).
-export([start/2, stop/1]).
-behaviour(supervisor).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
-define(... |
4cf1a7fea814169d776bd86ade1e1ea7040fe77085c847c731cfd2bba4360ae1 | racket/typed-racket | mpair.rkt | #;#;
#<<END
TR opt: mpair.rkt 13:6 (mcar x) -- pair
TR opt: mpair.rkt 4:0 (mcar x) -- pair
TR opt: mpair.rkt 5:0 (mcdr x) -- pair
TR opt: mpair.rkt 6:0 (set-mcar! x (+ 1 2)) -- pair
TR opt: mpair.rkt 6:13 (+ 1 2) -- fixnum bounded expr
TR opt: mpair.rkt 7:0 (set-mcdr! x (+ 1.0 2.0)) -- pair
TR opt: mpair.rkt 7:13 (+ 1.... | null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/optimizer/tests/mpair.rkt | racket | #; | #<<END
TR opt: mpair.rkt 13:6 (mcar x) -- pair
TR opt: mpair.rkt 4:0 (mcar x) -- pair
TR opt: mpair.rkt 5:0 (mcdr x) -- pair
TR opt: mpair.rkt 6:0 (set-mcar! x (+ 1 2)) -- pair
TR opt: mpair.rkt 6:13 (+ 1 2) -- fixnum bounded expr
TR opt: mpair.rkt 7:0 (set-mcdr! x (+ 1.0 2.0)) -- pair
TR opt: mpair.rkt 7:13 (+ 1.0 2.0... |
ddabc18ffaf89efa113b6d96a7f03edc3f12686c9c1d865e8e4b1cd954e6f41b | haas/harmtrace | ChordTokens.hs | {-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GADTs #-}
# OPTIONS_GHC -Wall -fno - warn - orphans #
module HarmTrace.Models.ChordToken... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Models/ChordTokens.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE EmptyDataDecls #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
------------------------------------------------------------------------------
Tokens for parsing chords
--------------------------------------... | # LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wall -fno - warn - orphans #
module HarmTrace.Models.ChordTokens ( ChordToken (..)
, PieceToken (..)
, ParseStatus (..)
, toKeyRelTok
... |
e3bccacba75ec34c271169459e9af210d94636dc31e0ac0aad3d2dde9012c7bb | WormBase/wormbase_rest | user.clj | (ns user
(:require [clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.test :as test]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[datomic.api :as d]
[mount.core :as mount]))
(defn resolv... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/dev/user.clj | clojure | (ns user
(:require [clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.test :as test]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[datomic.api :as d]
[mount.core :as mount]))
(defn resolv... | |
6c38d407edb00aa277097e63406da074e1ec00417cae150f763c19f6fad5b281 | OCamlPro/typerex-lint | test_parallel_let_bindings.ml | let _ =
let _x = 1
and _y = 2
and _z = 3
in
()
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-sempatch/tests/sempatch_parallel_let_bindings/test_parallel_let_bindings.ml | ocaml | let _ =
let _x = 1
and _y = 2
and _z = 3
in
()
| |
b398ef55ba7b2965cc0a5d2f7d162478bbc61b77c65854bf2f00b0471e49703d | awkay/om-tutorial | E_UI_Queries_and_State.cljs | (ns om-tutorial.E-UI-Queries-and-State
(:require-macros [cljs.test :refer [is]])
(:require [om.next :as om :refer-macros [defui]]
[om.next.impl.parser :as p]
[om-tutorial.queries.query-editing :as qe]
[om.dom :as dom]
[cljs.reader :as r]
[om-tutorial.queri... | null | https://raw.githubusercontent.com/awkay/om-tutorial/83ca10d91380ba62458b98ccaa80fd11b9c8321d/src/tutorial/om_tutorial/E_UI_Queries_and_State.cljs | clojure | (ns om-tutorial.E-UI-Queries-and-State
(:require-macros [cljs.test :refer [is]])
(:require [om.next :as om :refer-macros [defui]]
[om.next.impl.parser :as p]
[om-tutorial.queries.query-editing :as qe]
[om.dom :as dom]
[cljs.reader :as r]
[om-tutorial.queri... | |
c03500410b5135e207ccba7ed3f02eb46ab92ffbc502bf94ad167ad3d49b2a12 | kupl/LearnML | original.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((e : aexp), (x : string)) : aexp =
match e with
| Const a -> Const 0
| Var a -> if a = x then Const 1 else Const 0
| Power (base, exp) ->
if base = x then Times [ Const exp... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub116/original.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((e : aexp), (x : string)) : aexp =
match e with
| Const a -> Const 0
| Var a -> if a = x then Const 1 else Const 0
| Power (base, exp) ->
if base = x then Times [ Const exp... | |
5a75b78f5cacdab689e722a2ca5140dea964b47e86aa3f587403b16494650489 | rksm/clj-org-analyzer | time.clj | (ns org-analyzer.time
(:require [java-time
:as
time
:refer
[adjust
as
before?
day-of-week
days
duration
local-date
local-date-time
minus
plu... | null | https://raw.githubusercontent.com/rksm/clj-org-analyzer/19da62aa4dcf1090be8f574f6f2d4c7e116163a8/src/org_analyzer/time.clj | clojure | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=> (\"12-15 Sat\"
\"12-24 Mon\"
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | (ns org-analyzer.time
(:require [java-time
:as
time
:refer
[adjust
as
before?
day-of-week
days
duration
local-date
local-date-time
minus
plu... |
47224494db09f3fe1825fdb832cc58e34719f62fe98d95ede97daa93d5b98261 | Helium4Haskell/helium | Imported.hs | module ImportTest.Imported where
class ClassA a
-- Sadly this test fails because imported modules containing classes cannot be compiled correctly.
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClassesStatic/ImportTest/Imported.hs | haskell | Sadly this test fails because imported modules containing classes cannot be compiled correctly. | module ImportTest.Imported where
class ClassA a
|
0b63687d02908141bda3df338a365748ffdf5c01a5dd7438189a0492f530e9fa | bmsherman/haskell-matlab | Spec.hs | module Main where
import Test.Engine (engineTests)
main :: IO ()
main = engineTests
| null | https://raw.githubusercontent.com/bmsherman/haskell-matlab/21cdb98a2bcf23c90eb31026063f4c3a2cf5da15/test/Spec.hs | haskell | module Main where
import Test.Engine (engineTests)
main :: IO ()
main = engineTests
| |
5648f639650a8323fcb99a458d05a75887c68ae60c6741ac3c5e328c7d91b134 | cl-rabbit/cl-bunny | connection-blocked.lisp | (in-package :cl-bunny.examples)
(defun connection-blocked ()
(with-connection ()
(with-channel ()
(let ((q (queue.declare-temp)))
(event+ (connection-on-blocked)
(lambda (connection reason)
(log:info "Connection ~a blocked with reason ~a"
... | null | https://raw.githubusercontent.com/cl-rabbit/cl-bunny/6da7fe161efc8d6bb0b8b09ac8efad03553d765c/examples/guides/extensions/connection-blocked.lisp | lisp | (in-package :cl-bunny.examples)
(defun connection-blocked ()
(with-connection ()
(with-channel ()
(let ((q (queue.declare-temp)))
(event+ (connection-on-blocked)
(lambda (connection reason)
(log:info "Connection ~a blocked with reason ~a"
... | |
59fd48e7e8838aad857affab571f421f832d2892836eab31342bd6dd4cbbdaaa | skypher/paktahn | util.lisp | (in-package :pak)
;;;; helper macros
(defmacro show-result (&body body)
`(let ((result (progn ,@body)))
(format t "result of form ~S: ~S~%" ',body result)
result))
(defmacro retrying (&body body)
"Execute BODY in a PROGN and return its value upon completion.
BODY may call RETRY at any time to restart it... | null | https://raw.githubusercontent.com/skypher/paktahn/ab2d3f91675bd658f7eec9186d3fd6db588ef413/src/util.lisp | lisp | helper macros
infos, notes, progress
TODO: support nested progress infos
error handling
FIXME: maybe it would be better to display later names
in parens instead of brakets, not just omit them fully.
Call BREAK, call BREAK in the debugger, and tell me
(trace parse-integer read-char)
(format t "preprocessed restar... | (in-package :pak)
(defmacro show-result (&body body)
`(let ((result (progn ,@body)))
(format t "result of form ~S: ~S~%" ',body result)
result))
(defmacro retrying (&body body)
"Execute BODY in a PROGN and return its value upon completion.
BODY may call RETRY at any time to restart its execution."
(le... |
5afe4f6f324b9f41603bf9e47cada67cb3b1f08a71658eb55f09df3fce8ce122 | chaoxu/fancy-walks | 17.hs | import Data.Char
one = ["","one","two","three","four","five","six","seven","eight", "nine","ten","eleven","twelve","thirteen","fourteen","fifteen", "sixteen","seventeen","eighteen", "nineteen"]
ty = ["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"]
speak x
| x < 0 || x > 1000 = error "Ou... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/17.hs | haskell | import Data.Char
one = ["","one","two","three","four","five","six","seven","eight", "nine","ten","eleven","twelve","thirteen","fourteen","fifteen", "sixteen","seventeen","eighteen", "nineteen"]
ty = ["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"]
speak x
| x < 0 || x > 1000 = error "Ou... | |
bf44259f4005c5ecff8a78ebad01e5d8befbc36516eb40a7770a17758656dd31 | ocaml/dune | exec.ml | open Stdune
open Import
let doc =
"Execute a command in a similar environment as if installation was performed."
let man =
[ `S "DESCRIPTION"
; `P
{|$(b,dune exec -- COMMAND) should behave in the same way as if you
do:|}
; `Pre " \\$ dune install\n \\$ COMMAND"
; `P
{|In particular i... | null | https://raw.githubusercontent.com/ocaml/dune/ec504c6f452681c7ce4e197def73c1d72e1a18a6/bin/exec.ml | ocaml | A command to execute, which knows how to (re)build the program and then
run it with some arguments in an enivorment
Helper function to spawn a new process running a command in an
environment, returning the new process' pid
When running `dune exec` in watch mode, this will keep track of the pid of
th... | open Stdune
open Import
let doc =
"Execute a command in a similar environment as if installation was performed."
let man =
[ `S "DESCRIPTION"
; `P
{|$(b,dune exec -- COMMAND) should behave in the same way as if you
do:|}
; `Pre " \\$ dune install\n \\$ COMMAND"
; `P
{|In particular i... |
7017aa505527a272831d2c32ba182369c9dbc060333f8810a4c7042e67e9714a | larandaA/hgraphs | Mutable.hs | module Data.Queue.Mutable
( STQueue
, newReserve, new
, empty, full
, capacity, size
, pop, push, drain
) where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector.Mutable as VM
import Data.STRef
data STQueue s e = STQueue
{ qHead :: STRef s Int
,... | null | https://raw.githubusercontent.com/larandaA/hgraphs/322b5cdfafbae851b4251c907e2c81b82cf02d4a/src/Data/Queue/Mutable.hs | haskell | # INLINE new #
# INLINE empty # | module Data.Queue.Mutable
( STQueue
, newReserve, new
, empty, full
, capacity, size
, pop, push, drain
) where
import Control.Monad
import Control.Monad.ST
import qualified Data.Vector.Mutable as VM
import Data.STRef
data STQueue s e = STQueue
{ qHead :: STRef s Int
,... |
1c067bcc2d18384ce7443c8902452dcee077145f75b3e2e3cb9aa8dff24031b9 | OlivierNicole/haskell-chess | ChessBoard.hs | {-# LANGUAGE BangPatterns #-}
module ChessBoard (
PieceType (..)
, Piece (Piece)
, ChessBoard
, nextMove
, switch
, emptyBoard
, initialPosition
, at
, update
, remove
, toList
, save
, restore
, chessMap
) where
import qualified Data.Char as C
import qualified Data.Vecto... | null | https://raw.githubusercontent.com/OlivierNicole/haskell-chess/3b76bbc39a6a43d6be9e22e4a68613eba2d2898d/ChessBoard.hs | haskell | # LANGUAGE BangPatterns #
| Representation of a chess position.
| Transforms a ChessBoard into a 'Vector' of square (either populated
| Player making the next move.
| Change player making the next move.
convention, chess boards are shown with the white camp downside)
and turns each row to a String before merging ... | module ChessBoard (
PieceType (..)
, Piece (Piece)
, ChessBoard
, nextMove
, switch
, emptyBoard
, initialPosition
, at
, update
, remove
, toList
, save
, restore
, chessMap
) where
import qualified Data.Char as C
import qualified Data.Vector as V
import Data.List (inter... |
9581528eaed491528b15d103302f685c177a5bbb33231bf6acf0a5a7759b3405 | ecraven/r7rs-benchmarks | STklos-prelude.scm | (define-syntax import
(syntax-rules ()
((import foo bar ...)
#t)))
(define (this-scheme-implementation-name)
"stklos")
| null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/STklos-prelude.scm | scheme | (define-syntax import
(syntax-rules ()
((import foo bar ...)
#t)))
(define (this-scheme-implementation-name)
"stklos")
| |
6a555c702cd510bbfb1d2940f9512faa7142b47c870cceb06d1afe13554ea1f6 | naproche/naproche | Representation.hs | -- |
Authors : ( 2019 )
--
-- TODO: Add description.
{-# LANGUAGE OverloadedStrings #-}
module SAD.Export.Representation (
Representation(..),
buildParens,
buildArgumentsWith,
commaSeparated,
Builder.toLazyText
) where
import Data.Text.Lazy.Builder (Builder)
import Data.Text.Lazy.Builder qualified as ... | null | https://raw.githubusercontent.com/naproche/naproche/6284a64b4b84eaa53dd0eb7ecb39737fb9135a0d/src/SAD/Export/Representation.hs | haskell | |
TODO: Add description.
# LANGUAGE OverloadedStrings # | Authors : ( 2019 )
module SAD.Export.Representation (
Representation(..),
buildParens,
buildArgumentsWith,
commaSeparated,
Builder.toLazyText
) where
import Data.Text.Lazy.Builder (Builder)
import Data.Text.Lazy.Builder qualified as Builder
class Representation a where
represent :: a -> Builder
b... |
40d784648382eb72c6ab8b179a1ef0405defe69a5700914a333df9cf12754acc | aradarbel10/Styff | zonk.ml | open Syntax.Common
module S = Syntax.Core
module Z = Syntax.Zonked
open! Typecheck.Eval
open Typecheck.Scene
(* identifiers in styff may contain quotes (') and symbols (user-defined operators)
which must be eliminated towards the backend. *)
let sanitize_str (nm : string) : string =
let allowed : char -> bool = f... | null | https://raw.githubusercontent.com/aradarbel10/Styff/38e5b455b26bd455c0266187c99f9a002919514a/lib/backend/zonk.ml | ocaml | identifiers in styff may contain quotes (') and symbols (user-defined operators)
which must be eliminated towards the backend.
constant folding (beta reduction) on the zonked language | open Syntax.Common
module S = Syntax.Core
module Z = Syntax.Zonked
open! Typecheck.Eval
open Typecheck.Scene
let sanitize_str (nm : string) : string =
let allowed : char -> bool = function
| 'a'..'z' | 'A'..'Z' | '0'..'9' -> true
| _ -> false
in if String.for_all allowed nm then nm else freshen_str "nm"
let sa... |
48731024b384ae3502a8449722271739af24f0c2770840a2a553ddac089c5e8e | RolfRolles/PandemicML | RREIL.mli | type sz = n
type var = id * sz * sz option
type flag = id
type condition =
| Flag of flag
| C of c
type lval = var
type rval =
| Var of v
| Interval of z * z
type rreil =
| Load of lval * rval
| Store of lval * rval
| Brc of condition * rval
| Call of rval
| Return of rval
| Add of lval * rval * rval
| Sub of ... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Projects/RREIL.mli | ocaml | type sz = n
type var = id * sz * sz option
type flag = id
type condition =
| Flag of flag
| C of c
type lval = var
type rval =
| Var of v
| Interval of z * z
type rreil =
| Load of lval * rval
| Store of lval * rval
| Brc of condition * rval
| Call of rval
| Return of rval
| Add of lval * rval * rval
| Sub of ... | |
f202d0a56190fbfafdee315cdbad227f411bcc342d45e261428fac29b35e488b | NorfairKing/the-notes | Main.hs | module Sets.Algebra.Main where
import Notes
import Sets.Algebra.Complement
import Sets.Algebra.Difference
import Sets.Algebra.Intersection
import Sets.Algebra.Union
algebra :: Note
algebra = section "The algebra of sets" $ do
setUnion
setIntersection
set... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Sets/Algebra/Main.hs | haskell | module Sets.Algebra.Main where
import Notes
import Sets.Algebra.Complement
import Sets.Algebra.Difference
import Sets.Algebra.Intersection
import Sets.Algebra.Union
algebra :: Note
algebra = section "The algebra of sets" $ do
setUnion
setIntersection
set... | |
02a098f4846d205fd0be8bfa0181dde6fc25f00050cb44891d1076962265a193 | SNePS/SNePS2 | sneps_config.lisp |
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
;; Version: $Id: sneps_config.lisp,v
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file are subject to the University at
B... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps_config.lisp | lisp | Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
Version: $Id: sneps_config.lisp,v
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific languag... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " basis , WITHOUT WARRANTY OF ANY KIND , either express
The Original Code i... |
770cb1290721b3d955147e42de0fd9955cee69f787fb160468d2b8c06b64202c | aiya000/haskell-examples | ifM.hs | import Control.Monad.Extra (ifM)
import System.Directory (doesFileExist)
main :: IO ()
main = do
x <- ifM (doesFileExist "aho") (return "yes aho") (return "no aho")
print x
let y = ifM Nothing (return "foo") (return "bar")
print y
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Control/Monad/Extra/ifM.hs | haskell | import Control.Monad.Extra (ifM)
import System.Directory (doesFileExist)
main :: IO ()
main = do
x <- ifM (doesFileExist "aho") (return "yes aho") (return "no aho")
print x
let y = ifM Nothing (return "foo") (return "bar")
print y
| |
3e0ed91d13962c41fc40a13aa1aacc02eba4acdafe66d16d1fc0f5beb2236bc9 | valerauko/kitsune-alpha | project.clj | (defproject social.kitsune/kitsune "0.2.0"
:description "Very fox microblogging service"
:url ""
:license {:name "GNU AFFERO GENERAL PUBLIC LICENSE"
:url "-3.0.en.html"}
:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/tools.namespace "1.1.0"]
[org.clojure... | null | https://raw.githubusercontent.com/valerauko/kitsune-alpha/34ca08e4013541aeaf1a5a5786f3189ff17c1a58/project.clj | clojure | (defproject social.kitsune/kitsune "0.2.0"
:description "Very fox microblogging service"
:url ""
:license {:name "GNU AFFERO GENERAL PUBLIC LICENSE"
:url "-3.0.en.html"}
:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/tools.namespace "1.1.0"]
[org.clojure... | |
b396270347b3098df9915f5ea7641ad636b02210ff3a90523208ece27fb6fb29 | sph-mn/sph-lib | path-pipe-chain.scm | (define-test-module (test module sph io path-pipe-chain)
(import
(sph io)
(sph filesystem)
(rnrs io ports)
(sph list)
(sph other)
(ice-9 threads)
(sph io path-pipe-chain))
(define (join-threads a) (each (l (a) (and (thread? a) (join-thread a))) a))
(define message "test")
(define (t... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/test/module/sph/io/path-pipe-chain.scm | scheme | (define-test-module (test module sph io path-pipe-chain)
(import
(sph io)
(sph filesystem)
(rnrs io ports)
(sph list)
(sph other)
(ice-9 threads)
(sph io path-pipe-chain))
(define (join-threads a) (each (l (a) (and (thread? a) (join-thread a))) a))
(define message "test")
(define (t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.