_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 |
|---|---|---|---|---|---|---|---|---|
3c77cc2f8011bb4dbe55ce85c0724f2fa0765f4db05d359333f2bb820eff601c | open-telemetry/opentelemetry-erlang | otel_meter_server_sup.erl | %%%------------------------------------------------------------------------
Copyright 2022 , OpenTelemetry Authors
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
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/8c06ff727ce9bca308e99cac01fba798c9e32f8b/apps/opentelemetry_experimental/src/otel_meter_server_sup.erl | erlang | ------------------------------------------------------------------------
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 o... | Copyright 2022 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(otel_meter_server_sup).
-behaviour(supervisor).
-export([start_link/2,
provider_pid/1]).
-export([init/1]).
-includ... |
80db81d99eb24ad4a81fc5f492cf0c7fe2f1167cded0f5b0e3439a487187da16 | cjohansen/gadget-inspector | dev.cljs | (ns ^:figwheel-hooks gadget.dev
(:require [cljs-data-browser.actions :as actions]
[gadget.core :as g]
[gadget.datafy :as d]
[gadget.dev-renderer]
[gadget.extensions]))
(def invoices
(list {:dueamount 182.31, :kid "755120058905", :due-date "2018-11-27T00:00:00", :invo... | null | https://raw.githubusercontent.com/cjohansen/gadget-inspector/c7b8ed79fbba7218bb214955342ed19d5cc57bfd/lib/dev/gadget/dev.cljs | clojure | (ns ^:figwheel-hooks gadget.dev
(:require [cljs-data-browser.actions :as actions]
[gadget.core :as g]
[gadget.datafy :as d]
[gadget.dev-renderer]
[gadget.extensions]))
(def invoices
(list {:dueamount 182.31, :kid "755120058905", :due-date "2018-11-27T00:00:00", :invo... | |
ab36c50952c64027de1f987f9b410748f56563da4eb90654f64fd5d67757f55a | lipas-liikuntapaikat/lipas | views.cljs | (ns lipas.ui.login.views
(:require
[clojure.spec.alpha :as s]
[lipas.ui.components :as lui]
[lipas.ui.login.events :as events]
[lipas.ui.login.subs :as subs]
[lipas.ui.mui :as mui]
[lipas.ui.utils :refer [<== ==> navigate!] :as utils]
[reagent.core :as r]))
(defn set-field [& args]
(==> [::eve... | null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/2f0ef61997f63cdb50cdf9f3f3a1f62f9faee253/webapp/src/cljs/lipas/ui/login/views.cljs | clojure | Error message
Register button
Helper text
Form
Email
Login button
Error messages
Helper text
Form
Username
Password
Enter press might occur 'immediately' so we can't afford
asynchronously.
Enter
Login button
Error messages
Forgot password | (ns lipas.ui.login.views
(:require
[clojure.spec.alpha :as s]
[lipas.ui.components :as lui]
[lipas.ui.login.events :as events]
[lipas.ui.login.subs :as subs]
[lipas.ui.mui :as mui]
[lipas.ui.utils :refer [<== ==> navigate!] :as utils]
[reagent.core :as r]))
(defn set-field [& args]
(==> [::eve... |
ea4b6343e8de872a7d0186320722157099192b870daee5622ef6fa8f07bf16bd | iambrj/imin | functions_test_7.rkt | (define (add [x : Integer] [y : Integer]) : Integer
(+ x y))
(add 40 2)
| null | https://raw.githubusercontent.com/iambrj/imin/6ba2c0386199ebe6a20caef4e2fd3b3cf10e6b63/tests/functions_test_7.rkt | racket | (define (add [x : Integer] [y : Integer]) : Integer
(+ x y))
(add 40 2)
| |
c80a04fc62359a7d47a8185237fc1c2c501899a4851cae32f114ea9d6f78429d | GrammaTech/sel | project.lisp | ;;; project.lisp --- evolve multiple source files
(defpackage :software-evolution-library/software/project
(:nicknames :sel/software/project :sel/sw/project)
(:use :gt/full
:metabang-bind
:software-evolution-library
:software-evolution-library/software/simple
:software-evolution-libr... | null | https://raw.githubusercontent.com/GrammaTech/sel/9e16d3a5fe5d1c4e72787c0302bf84dea55d4503/software/project.lisp | lisp | project.lisp --- evolve multiple source files
Create software objects for these other files.
These are represented as simple text files, for line-oriented diffs.
Evolve files may have come from the build dir, but that
doesn't matter here as we are comparing the relativized paths.
For now do not include symlinks. ... | (defpackage :software-evolution-library/software/project
(:nicknames :sel/software/project :sel/sw/project)
(:use :gt/full
:metabang-bind
:software-evolution-library
:software-evolution-library/software/simple
:software-evolution-library/components/formatting
:software-evolut... |
a7f4b23245106d3b73bc7d550646078601f89ecf4648ee485c1f86766182e377 | conjure-cp/conjure | ModelDiff.hs | module Conjure.Language.ModelDiff
( modelDiff
, modelDiffIO
) where
-- conjure
import Conjure.Prelude
import Conjure.UserError
import Conjure.Language.Definition
import Conjure.Language.Pretty
-- containers
import qualified Data.Set as S
modelDiffIO :: MonadUserError m => Model -> Model -> m ()
modelDif... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/ModelDiff.hs | haskell | conjure
containers
| returns `Just msg` if the models are different, msg being an explanation of what's diff.
returns `Nothing` if the models are the same. | module Conjure.Language.ModelDiff
( modelDiff
, modelDiffIO
) where
import Conjure.Prelude
import Conjure.UserError
import Conjure.Language.Definition
import Conjure.Language.Pretty
import qualified Data.Set as S
modelDiffIO :: MonadUserError m => Model -> Model -> m ()
modelDiffIO m1 m2 =
case mode... |
75ed513125e19974e96fa871d72da8b69d9f5c53f6a573d7ce9ca0a8cb64c11f | ngrunwald/stanford-nlp-tools | core.clj | (ns stanford-nlp-tools.test.core
(:use [stanford-nlp-tools.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/ngrunwald/stanford-nlp-tools/a209d4aaa2dd3e74caedf07720d53c8c28fb7d20/test/stanford_nlp_tools/test/core.clj | clojure | FIXME: write | (ns stanford-nlp-tools.test.core
(:use [stanford-nlp-tools.core])
(:use [clojure.test]))
(is false "No tests have been written."))
|
333ab3d3d1d4d6416ce7fae6ae8ae63648b85c0798c25a95cf37e407f518e692 | bos/rwh | AlgebraicVector.hs | {-- snippet types --}
-- x and y coordinates or lengths.
data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
-- Angle and distance (magnitude).
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
{-- /snippet types --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch04/AlgebraicVector.hs | haskell | - snippet types -
x and y coordinates or lengths.
Angle and distance (magnitude).
- /snippet types - | data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
|
40540476bb15206aa2d48295ef4eeafe1deb33ee4511acf07f620d9439c3f8ed | stuartsierra/log.dev | project.clj | (defproject com.stuartsierra/log.dev "0.2.1-SNAPSHOT"
:description "Quick-start logging for local development using Logback and SLF4J"
:url ""
:dependencies
[;; Use Logback as the main logging implementation:
[ch.qos.logback/logback-classic "1.1.7"]
[ch.qos.logback/logback-core "1.1.7"]
Logback impleme... | null | https://raw.githubusercontent.com/stuartsierra/log.dev/fd116a14bd0aef9bd5d23c041920888a7eb78c23/project.clj | clojure | Use Logback as the main logging implementation:
Requires installing the bridge handler, see README:
Exclude transitive dependencies on all other logging | (defproject com.stuartsierra/log.dev "0.2.1-SNAPSHOT"
:description "Quick-start logging for local development using Logback and SLF4J"
:url ""
:dependencies
[ch.qos.logback/logback-classic "1.1.7"]
[ch.qos.logback/logback-core "1.1.7"]
Logback implements the SLF4J API :
[org.slf4j/slf4j-api "1.7.22"]
... |
0f3e5973a8ae8c54b69a49d3d80bb79f17ffb9540d5f0a59e5025241b063da71 | eudoxia0/parsing-menhir | menhir_tutorial.ml | (* bin/menhir_tutorial.ml *)
open Menhir_tutorial_core.Ast
open Menhir_tutorial_core.ParserInterface
let pop = function
| [] -> raise (Failure "Stack is empty")
| first::rest -> (first, rest)
let push v s = v :: s
let rec eval_program program stack =
match program with
| [] ->
stack
| head::rest ->
... | null | https://raw.githubusercontent.com/eudoxia0/parsing-menhir/66446d5101fa0136e6922267d06300187d69e4d4/forth/bin/menhir_tutorial.ml | ocaml | bin/menhir_tutorial.ml
Constants are self-evaluating | open Menhir_tutorial_core.Ast
open Menhir_tutorial_core.ParserInterface
let pop = function
| [] -> raise (Failure "Stack is empty")
| first::rest -> (first, rest)
let push v s = v :: s
let rec eval_program program stack =
match program with
| [] ->
stack
| head::rest ->
let stack = (match head wi... |
9a6ba9e3ac376d8f5c0749bcae09ebd14305caac0193e1bd44b64ecacfd283d3 | mojombo/yaws | ymnesia.erl | %%%-------------------------------------------------------------------
Created : 14 Oct 2005 by < >
Desc . : A naive table viewer Yaws - app interface .
%%%
@author < >
%%%
@doc Ymnesia is a Yaws appmod to view tables .
%%% Add <b>ymnesia</b> as an appmod to your Yaws configuration.
Point... | null | https://raw.githubusercontent.com/mojombo/yaws/f75fde80f1e35a87335f21d0983e3285eb665f17/src/ymnesia.erl | erlang | -------------------------------------------------------------------
Add <b>ymnesia</b> as an appmod to your Yaws configuration.
<ul>
<br/>(<i>atoms need to be single-quoted</i>)</li>
<li> The checkbox control if the attribute should be shown in
the result. <br/>No checkbox mea... | Created : 14 Oct 2005 by < >
Desc . : A naive table viewer Yaws - app interface .
@author < >
@doc Ymnesia is a Yaws appmod to view tables .
Point your browser to : &
< li > You can search on arbitrary Erlang terms .
-module(ymnesia).
-export([out/1]).
-import(lists, [map/2, foldl/3,... |
5dd088223399f7658a56869ef16355d645539014855aa78b5f1a6e1de374f747 | mflatt/shrubbery-rhombus-0 | navigation.rkt | #lang racket/base
(require racket/class
racket/list
"lex.rkt"
"private/edit-help.rkt")
;; Conventions are the same as in "indentation.rkt"
(provide shrubbery-grouping-position)
(define (shrubbery-grouping-position t pos limit-pos direction)
(case direction
[(backward)
(define-va... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/2bbf56fda3ef606ac9275b454cf0e7bba2b00153/shrubbery/navigation.rkt | racket | Conventions are the same as in "indentation.rkt"
immediately before a `|` is a special case
give a `pos` that's right before a bar, return the start of the
first `|` in the block, or return the start of the enclsing block
checking before
candidate bar (to move just before) most recently found (right line or colum... | #lang racket/base
(require racket/class
racket/list
"lex.rkt"
"private/edit-help.rkt")
(provide shrubbery-grouping-position)
(define (shrubbery-grouping-position t pos limit-pos direction)
(case direction
[(backward)
(define-values (s e) (skip-whitespace #:and-separators? #t t (... |
2868568d6482f872bc77b4e4c3431c32585c7734ce70abdfb47a786578a7b971 | axelarge/advent-of-code | day07.clj | (ns advent-of-code.y2018.day07
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]
[clojure.set :as set]))
(def test-input
(str "Step C must be finished before step A can begin.\n"
"Step C must be finished before step F can begin.\n"
"Step A must be finishe... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2018/day07.clj | clojure | Ensure every node is in map | (ns advent-of-code.y2018.day07
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]
[clojure.set :as set]))
(def test-input
(str "Step C must be finished before step A can begin.\n"
"Step C must be finished before step F can begin.\n"
"Step A must be finishe... |
12b8d79eac7ca3cfef4f01f97f24271a7fbb619b000978b2742ad1bc54a1778b | input-output-hk/marlowe-cardano | Connection.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
module Network.Protocol.Connection
where
import Control.Applicative ((<|>))
import Control.Concurrent.STM (STM, TQueue, atomically, newTQueue, readTQueue, writeTQueue)
import Control.Except... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/86a2088298ce0f5484701d110c71cfb8d63402fb/marlowe-protocols/src/Network/Protocol/Connection.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
^ Enable channel messages
^ Enable peer messages | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE PolyKinds #
module Network.Protocol.Connection
where
import Control.Applicative ((<|>))
import Control.Concurrent.STM (STM, TQueue, atomically, newTQueue, readTQueue, writeTQueue)
import Control.Exception (SomeException)
import Control.Monad.Base (Mona... |
028890bb307b933cb84663cc99b7212097eeaeeb86bf7eb33a75e45220fab17a | mkremins/ceci | util.cljs | (ns ceci.util)
(def metadatable? (some-fn coll? symbol?))
(defn merge-meta [form metadata]
(if (metadatable? form)
(vary-meta form merge metadata)
form))
(defn source-info [form]
(str "in form: " (pr-str form) " "
(if-let [{:keys [line column]} (meta form)]
(str "(" line ":" column ")") "... | null | https://raw.githubusercontent.com/mkremins/ceci/870308f4655a23cb6a774b14733f28ccc39d6d79/src/ceci/util.cljs | clojure | (ns ceci.util)
(def metadatable? (some-fn coll? symbol?))
(defn merge-meta [form metadata]
(if (metadatable? form)
(vary-meta form merge metadata)
form))
(defn source-info [form]
(str "in form: " (pr-str form) " "
(if-let [{:keys [line column]} (meta form)]
(str "(" line ":" column ")") "... | |
c50d57c6f96748c4c4bf6a531ede96270651662b178d511c7b2a82891fb70758 | jeromesimeon/Galax | code_constructors.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_constructors.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : code_constructors.mli , v 1.11 2007/08/17 18:28:54 simeon Exp $
open Code_selection_context
open Execution_context
open Namespace_symbols
open Physical_value
val build_scalar_code :
code_selection_context ->
Algebra_type.... |
9ae485b5880b586341ff54add2918a0a08a9b518e5e8db21d9abf1df85a3e1ac | eklavya/hascas | Query.hs | # LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Query where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.STM
impor... | null | https://raw.githubusercontent.com/eklavya/hascas/9615b7152aaccf9deb75559a8bccd49c1a951801/src/Query.hs | haskell | # LANGUAGE OverloadedStrings #
| Run a query directly.
| Execute a prepared query.
| Combine DSL actions
@
@ | # LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Query where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.STM
import Control.Concurrent.STM.TB... |
91636d235f89d5f59d1b9bc2a7b9057928ca5568f2eb0cc52684948c97d00754 | project-oak/hafnium-verification | Prop.mli |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* 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) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/biabduction/Prop.mli | ocaml | * kind for normal props, i.e. normalized
* kind for exposed props
* kind for sorted props
* Proposition.
* the kind 'a should range over [normal] and [exposed]
* spatial part
* substitution
* pure part
* abduced spatial part
* abduced pure part
* Compare propositions
* Dump a substitution.
* Pretty print a ... |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* 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) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
b5daf619de900f0e39f9dde7b9b52272984194bbd5dde8a44c6a78d5afe44dfc | slyrus/mcclim-old | glimpse-command-tables.lisp |
(in-package :glimpse)
;; 'General' glimpse commands (those that operate on the application, select a mode,
;; or that are always applicable) are placed in here.
(define-command-table glimpse-commands)
;; Commands specific to WINDOW MODE go in here...
(define-command-table glimpse-window-mode-cmds :inherit-from (glim... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Backends/beagle/glimpse/glimpse-command-tables.lisp | lisp | 'General' glimpse commands (those that operate on the application, select a mode,
or that are always applicable) are placed in here.
Commands specific to WINDOW MODE go in here...
Commands specific to PROCESS MODE go in here... |
(in-package :glimpse)
(define-command-table glimpse-commands)
(define-command-table glimpse-window-mode-cmds :inherit-from (glimpse-commands))
(define-command-table glimpse-process-mode-cmds :inherit-from (glimpse-commands))
|
6904452d441498beaa7bd26f7b8ef21f5d573fb5ad65931ee5b4eb9e58ed12a3 | apache/couchdb-ioq | ioq_kv_tests.erl | 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 License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-ioq/6abecf97f0caff1f5ea11deb92a02d689ce4eb17/test/ioq_kv_tests.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(ioq_kv_tests).
-ifdef(WITH_PROPER).
-behaviour(proper_statem).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
... |
045fb22354262e9f89f55bd79ff673052efa2c05541f79fcfac59d095a47602b | gator1/jepsen | sequential.clj | (ns jepsen.cockroach.sequential
"A sequential consistency test.
Verify that client order is consistent with DB order by performing queries
(in four distinct transactions) like
A: insert x
A: insert y
B: read y
B: read x
A's process order enforces that x must be visible before y, so we should
always... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/cockroachdb/src/jepsen/cockroach/sequential.clj | clojure | (j/with-db-transaction [c c :isolation c/isolation-level] | (ns jepsen.cockroach.sequential
"A sequential consistency test.
Verify that client order is consistent with DB order by performing queries
(in four distinct transactions) like
A: insert x
A: insert y
B: read y
B: read x
A's process order enforces that x must be visible before y, so we should
always... |
4c9c77c1afb5cfe6db57c0abbd23633e47b461941131be87772c856101d5fa33 | haskell/play-haskell | Sign.hs | # LANGUAGE ViewPatterns #
module PlayHaskellTypes.Sign (
-- * Data types
PublicKey(..),
SecretKey,
Signature(..),
readSecretKey,
readPublicKey,
revealSecretKey,
publicKey,
-- * Signing
sign,
verify,
) where
import qualified Crypto.Error as Cr
import qualified Crypto.PubKey.Ed25519 as Cr
import q... | null | https://raw.githubusercontent.com/haskell/play-haskell/a8ae8e62f9b6867b72ea94b47c837408b9a867f7/play-haskell-types/src/PlayHaskellTypes/Sign.hs | haskell | * Data types
* Signing
| 32 bytes.
Note: The 'Show' instance doesn't actually show the secret key itself.
| 64 bytes.
| Use this function with care; do this only in a short-lived process that
| Return the public key corresponding to a secret key.
| The 'ByteString' is the message to sign.
| The 'ByteString' i... | # LANGUAGE ViewPatterns #
module PlayHaskellTypes.Sign (
PublicKey(..),
SecretKey,
Signature(..),
readSecretKey,
readPublicKey,
revealSecretKey,
publicKey,
sign,
verify,
) where
import qualified Crypto.Error as Cr
import qualified Crypto.PubKey.Ed25519 as Cr
import qualified Data.Aeson as J
import q... |
0d62116da0386dc299abe4c6980979d4e1af873df369f925930c92a4cb2170ed | untangled-web/untangled-client | util_spec.cljs | (ns untangled.client.impl.util-spec
(:require
[untangled-spec.core :refer-macros [specification when-mocking assertions]]
[untangled.client.impl.util :as util]
[om.next :as om]))
(specification "Log app state"
(let [state (atom {:foo {:a :b
12 {:c ["hell... | null | https://raw.githubusercontent.com/untangled-web/untangled-client/d9b350db3a5e19910692ee70281d8c156fd3a3f9/spec/untangled/client/impl/util_spec.cljs | clojure | (ns untangled.client.impl.util-spec
(:require
[untangled-spec.core :refer-macros [specification when-mocking assertions]]
[untangled.client.impl.util :as util]
[om.next :as om]))
(specification "Log app state"
(let [state (atom {:foo {:a :b
12 {:c ["hell... | |
556e9dcac637b8108e1ccfbf87e1d7bf949efaed2ec5778aabff9a03aa670f39 | Kyorai/cuttlefish | cuttlefish_variable.erl | %% -------------------------------------------------------------------
%%
%% handles both variable and variable definitions
%%
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
... | null | https://raw.githubusercontent.com/Kyorai/cuttlefish/6b284f5054cd63b76e7563bd528fb7817e77d05d/src/cuttlefish_variable.erl | erlang | -------------------------------------------------------------------
handles both variable and variable definitions
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the Lice... | Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(... |
dc84998d337996aa0f9aea81cf82f8709e2177a05cc0a5b0ff2eb8466ee96c75 | fulcrologic/fulcro-rad-kvstore | auto_resolvers.clj | (ns play.com.example.components.auto-resolvers
(:require
[com.example.model :refer [all-attributes]]
[mount.core :refer [defstate]]
[com.fulcrologic.rad.database-adapters.key-value.pathom :as kv-pathom]
[au.com.seasoft.general.dev :as dev]))
(comment
[{:com.fulcrologic.rad.attributes/type ... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/f0046c21e386214b42d4621b33dcb3aa1058ad52/src/play/play/com/example/components/auto_resolvers.clj | clojure | (ns play.com.example.components.auto-resolvers
(:require
[com.example.model :refer [all-attributes]]
[mount.core :refer [defstate]]
[com.fulcrologic.rad.database-adapters.key-value.pathom :as kv-pathom]
[au.com.seasoft.general.dev :as dev]))
(comment
[{:com.fulcrologic.rad.attributes/type ... | |
4d393273039fd3cc636723c221fb3fade6a9454bb30a62815f68eeecd5871afc | zotonic/zotonic | mod_admin_category.erl | @author < >
2009 - 2015
%% @doc Module for editing and managing categories.
Copyright 2009 - 2015
%%
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
%%
%% ... | null | https://raw.githubusercontent.com/zotonic/zotonic/1521e58e409c26b085d3a10d2c7b5bb51afa5699/apps/zotonic_mod_admin_category/src/mod_admin_category.erl | erlang | @doc Module for editing and managing categories.
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 th... | @author < >
2009 - 2015
Copyright 2009 - 2015
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_admin_category).
-author("Marc Worrell <>").
-mod_title("Admin category support").
-mod_description("S... |
1535d2d30614f583c1e467c5cf924022ab73828b56deabc24548e939e70ec857 | Clozure/ccl-tests | nintersection.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 20 07:40:02 2003
Contains : Tests of NINTERSECTION
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest nintersection.1
(nintersection nil nil)
nil)
(deftest nintersection.2
(nintersection (loop for i from 1 to 100 collect i) nil)
n... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/nintersection.lsp | lisp | -*- Mode: Lisp -*-
Key argument
Check that a nil key argument is ignored
Test that nintersection preserves the order of arguments to :test, :test-not
Order of argument evaluation tests
Keyword tests | Author :
Created : Sun Apr 20 07:40:02 2003
Contains : Tests of NINTERSECTION
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest nintersection.1
(nintersection nil nil)
nil)
(deftest nintersection.2
(nintersection (loop for i from 1 to 100 collect i) nil)
nil)
(deftest nintersect... |
4c47265cf52e7586236c1d7000be488d896a8aa91ad4bb002758d4d92cdbd7d3 | froggey/Mezzano | xp.lisp | (in-package :mezzano.xp)
This is the November , 26 1991 version of
XP pretty printer .
;The standard version of this program is available by anonymous FTP
from MERL.COM in the files /pub / xp / xp * . If you have gotten the file
;from somewhere else, or copied the files a long time ago, you might
consider copyi... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/xp.lisp | lisp | The standard version of this program is available by anonymous FTP
from somewhere else, or copied the files a long time ago, you might
------------------------------------------------------------------------
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without ... | (in-package :mezzano.xp)
This is the November , 26 1991 version of
XP pretty printer .
from MERL.COM in the files /pub / xp / xp * . If you have gotten the file
consider copying them from now to obtain the latest version .
Copyright Massachusetts Institute of Technology , Cambridge , Massachusetts .
M... |
928f74ab8408393a6861a46341a590ab60ac10cbebcb601849331659d475d65a | Incubaid/arakoon | server_test.ml |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
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
distribut... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/src/tools/server_test.ml | ocaml |
Copyright ( 2010 - 2014 ) INCUBAID BVBA
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
distribut... | |
0ccdb4d268569f2adb16cbabfccf255d9b946796c25c25ee09f6096998743389 | exercism/babashka | leap_test.clj | (ns leap-test
(:require [clojure.test :refer [deftest is]]
leap))
(deftest year-not-divisible-by-4
(is (not (leap/leap-year? 2015))))
(deftest year-divisible-by-2-but-not-4
(is (not (leap/leap-year? 1970))))
(deftest year-divisible-by-4-but-not-100
(is (leap/leap-year? 1996)))
(deftest year-divi... | null | https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/leap/test/leap_test.clj | clojure | (ns leap-test
(:require [clojure.test :refer [deftest is]]
leap))
(deftest year-not-divisible-by-4
(is (not (leap/leap-year? 2015))))
(deftest year-divisible-by-2-but-not-4
(is (not (leap/leap-year? 1970))))
(deftest year-divisible-by-4-but-not-100
(is (leap/leap-year? 1996)))
(deftest year-divi... | |
d50c5df24c35e4ade208103d608f7ad1d7ac1190a892ebf8589f43501203f856 | xh4/web-toolkit | char.lisp | Parsers for character inputs .
(in-package :maxpc.char)
(defun ?char (char &optional (case-sensitive-p t))
"*Arguments and Values:*
_char_—a _character_.
_case‑sensitive‑p_—a _generalized boolean_. The default is _true_.
*Description:*
{?char} matches _char_. {?char} is case sensitive unless _case... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/maxpc-20171130-git/char.lisp | lisp | Parsers for character inputs .
(in-package :maxpc.char)
(defun ?char (char &optional (case-sensitive-p t))
"*Arguments and Values:*
_char_—a _character_.
_case‑sensitive‑p_—a _generalized boolean_. The default is _true_.
*Description:*
{?char} matches _char_. {?char} is case sensitive unless _case... | |
5d457dc5880122de1dd396709a35f00ee718a805382862d9b792d31f5e8f405c | reanimate/reanimate | doc_inferno.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ animate $ const $ showColorMap inferno
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_inferno.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ animate $ const $ showColorMap inferno
|
8b0b37b2efa659e329cad6696ba8ab1688e602b1113edb5444d41e145c88ab0c | dyzsr/ocaml-selectml | pr9695_bad.ml | TEST
flags = " -w -a -no - alias - deps "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a -no-alias-deps"
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
modul... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-modules-bugs/pr9695_bad.ml | ocaml | TEST
flags = " -w -a -no - alias - deps "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a -no-alias-deps"
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
modul... | |
97358c06fc8cda517f48ca5ee32a8099a0dcb28d1676da54a8283c68d0bccb82 | jgoerzen/missingpy | genexceptions.hs | import MissingH.Str
import Data.List
import System.IO
import Data.Char
notice = " NOTICE -- THIS FILE IS AUTO-GENERATED -- DO NOT EDIT"
ifdefcode str =
"#ifdef MS_WINDOWS\n" ++ str ++ "\n#endif\n"
windowsexc = "WindowsError"
genGlue copyright excs =
do h <- openFile "glue/excglue.h" WriteMode
c <- op... | null | https://raw.githubusercontent.com/jgoerzen/missingpy/ab857768341f172c2b2e2bd496a97290c9fa3d46/genexceptions.hs | haskell | import MissingH.Str
import Data.List
import System.IO
import Data.Char
notice = " NOTICE -- THIS FILE IS AUTO-GENERATED -- DO NOT EDIT"
ifdefcode str =
"#ifdef MS_WINDOWS\n" ++ str ++ "\n#endif\n"
windowsexc = "WindowsError"
genGlue copyright excs =
do h <- openFile "glue/excglue.h" WriteMode
c <- op... | |
f8fee3801cfcbda16200473b486ee94266c40b34f34acdac8b814e6711a0d078 | racket/drracket | online-comp.rkt | #lang racket/base
(require racket/class
racket/place
racket/match
racket/contract
(for-syntax racket/base)
drracket/private/syncheck/traversals
drracket/private/syncheck/syncheck-intf
drracket/private/syncheck/xref
"../../private/eval-helpers-and-p... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/drracket/private/syncheck/online-comp.rkt | racket | the hope is that changing the custodian like this
shouldn't leak these threads, but it does seem to
so for now we don't use it
[current-custodian orig-cust])
the online-check-syntax logger is a public api
so use this struct so the listener can trust
the messages that are coming from this file
this is called from... | #lang racket/base
(require racket/class
racket/place
racket/match
racket/contract
(for-syntax racket/base)
drracket/private/syncheck/traversals
drracket/private/syncheck/syncheck-intf
drracket/private/syncheck/xref
"../../private/eval-helpers-and-p... |
eeb1133394d8cb1f0a7e66c0664274c36d04c87e2229cb0ffe2b45de95dc1882 | infi-nl/alibi | entry_app_svc.clj | (ns alibi.domain.entry-app-svc
(:require
[alibi.domain.user :as user-repo]
[alibi.domain.entry :as entry]
[alibi.infra.date-time :refer [local-time? before?
local-date?]]
[alibi.domain.project :as project]
[alibi.domain.task :as task]))
(defn- valid-task? [task-... | null | https://raw.githubusercontent.com/infi-nl/alibi/00e97340ebff483f0ecbb3eef929a4052adbc78b/src/alibi/domain/entry_app_svc.clj | clojure | (ns alibi.domain.entry-app-svc
(:require
[alibi.domain.user :as user-repo]
[alibi.domain.entry :as entry]
[alibi.infra.date-time :refer [local-time? before?
local-date?]]
[alibi.domain.project :as project]
[alibi.domain.task :as task]))
(defn- valid-task? [task-... | |
1fba466d55d79d810b934a87270a79de18cc3067bae4b08978cfd414be96e934 | mransan/ocaml-protoc-yojson | pbrt_yojson.mli | (** Protobuf JSON encoding runtime *)
(** All exception which could be raised by the generated JSON encoder
and decode function *)
module E : sig
type error =
| Unexpected_json_type of string * string
| Malformed_variant of string
exception Failure of error
(** Decoding/Encoding failure *)
... | null | https://raw.githubusercontent.com/mransan/ocaml-protoc-yojson/b1b9005e37ef46ea57b3cdeb619f759cf881f60c/src/pbrt_yojson.mli | ocaml | * Protobuf JSON encoding runtime
* All exception which could be raised by the generated JSON encoder
and decode function
* Decoding/Encoding failure
* [malformed_variant variant_name] raise
[Failure (Malformed_variant variant_name)]
* Helper module for the generated code for common
functionality |
module E : sig
type error =
| Unexpected_json_type of string * string
| Malformed_variant of string
exception Failure of error
val unexpected_json_type : string -> string -> 'a
* [ unexpected_json_type record_name field_name ] raises
[ Failure ( Unexpected_json_type ( record_name , field_... |
21ea9bb1fc8192f7cf8e55977ec220d2d1fb0343dcd2b7e9e7a523817f6dfd5d | mithrandi/isaacranks | IsaacPool.hs | module Model.IsaacPool (IsaacPool(..)) where
import Data.Aeson.TH
import Prelude
import Yesod
data IsaacPool = PoolItemRoom
| PoolShop
| PoolBossRoom
| PoolDevilRoom
| PoolAngelRoom
| PoolSecretRoom
| PoolLibrary
... | null | https://raw.githubusercontent.com/mithrandi/isaacranks/7943ea00ef3d3f415cae61e33d9f16f234de895f/Model/IsaacPool.hs | haskell | module Model.IsaacPool (IsaacPool(..)) where
import Data.Aeson.TH
import Prelude
import Yesod
data IsaacPool = PoolItemRoom
| PoolShop
| PoolBossRoom
| PoolDevilRoom
| PoolAngelRoom
| PoolSecretRoom
| PoolLibrary
... | |
1627c5d0d4e999566ddab8ccb5bd4dab4c2f4d4f410b443e25b67dd788302367 | opencog/test-datasets | cancer-incoming-set.scm | ((EvaluationLink
(ConceptNode "Gary" (stv -nan 1))
(PredicateNode "cancer" (av 1000 0 0))
)
(EvaluationLink (stv -nan 1)
(PredicateNode "cancer" (av 1000 0 0))
(ConceptNode "Gary" (stv -nan 1))
)
(EvaluationLink
(ListLink
(ConceptNode "Gary" (stv -nan 1))
)
(PredicateNode "cancer" (av 1000 ... | null | https://raw.githubusercontent.com/opencog/test-datasets/62677dbe59de4d59a9eb308e59ac602dff452872/pln/tuffy/smokes/tests/03-08-14/cancer-incoming-set.scm | scheme | ((EvaluationLink
(ConceptNode "Gary" (stv -nan 1))
(PredicateNode "cancer" (av 1000 0 0))
)
(EvaluationLink (stv -nan 1)
(PredicateNode "cancer" (av 1000 0 0))
(ConceptNode "Gary" (stv -nan 1))
)
(EvaluationLink
(ListLink
(ConceptNode "Gary" (stv -nan 1))
)
(PredicateNode "cancer" (av 1000 ... | |
068efc32586affd064f2641783af6e4523d2168c7b99dc0c0ee7d3fd72c68519 | silentsignal/DirBustErl | dirbusterl_body_parser.erl | -module(dirbusterl_body_parser).
-behavior(gen_event).
-export([init/1, handle_event/2, terminate/2]).
-include_lib("eunit/include/eunit.hrl").
init(Server) ->
{ok, Server}.
handle_event({finished, URL, Code, Contents}, Server)
when Code =/= error, is_list(Contents) ->
parse_body_values(extract_paths_from_body(... | null | https://raw.githubusercontent.com/silentsignal/DirBustErl/bbdfdebb93241036500794e7055aae45a7ac9514/src/dirbusterl_body_parser.erl | erlang | remove ?... #... | -module(dirbusterl_body_parser).
-behavior(gen_event).
-export([init/1, handle_event/2, terminate/2]).
-include_lib("eunit/include/eunit.hrl").
init(Server) ->
{ok, Server}.
handle_event({finished, URL, Code, Contents}, Server)
when Code =/= error, is_list(Contents) ->
parse_body_values(extract_paths_from_body(... |
d372455c488d8aca9891a89d84a13acbd838c99992c1aa96d57f3e3b6f68c8a1 | satori-com/mzbench | data_script.erl | [{pool, [{size, {var, "nodes_num"}},
{worker_type, dummy_worker}],
[{print, "OHAI"}]
}].
| null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/acceptance_tests/scripts/data_script.erl | erlang | [{pool, [{size, {var, "nodes_num"}},
{worker_type, dummy_worker}],
[{print, "OHAI"}]
}].
| |
d5f2222d84a7b3b82dc9e71708543852eb82de2160041471d0bae62721c98544 | poscat0x04/telegram-types | MessageId.hs | module Web.Telegram.Types.Internal.MessageId where
import Common
newtype MessageId = MessageId
{ -- | Unique message identifier
messageId :: Int
}
deriving stock (Show, Eq)
mkLabel ''MessageId
deriveJSON snake ''MessageId
| null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/MessageId.hs | haskell | | Unique message identifier | module Web.Telegram.Types.Internal.MessageId where
import Common
newtype MessageId = MessageId
messageId :: Int
}
deriving stock (Show, Eq)
mkLabel ''MessageId
deriveJSON snake ''MessageId
|
c9b7358c941a0e73c16ade473699b94827c2dc451a29c3288916021f8cef0e7a | cushon/project-euler | 53.rkt | #lang racket
(require "common.rkt")
Find the number of values of nCr great than 1000000 for 1 < = n < = 100 .
(define (solve)
(length
(filter (lambda (x) (> x 1000000))
(map
(lambda (x)
(apply choose x))
(filter (lambda (x) (>= (first x) (second x)))
... | null | https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/53.rkt | racket | #lang racket
(require "common.rkt")
Find the number of values of nCr great than 1000000 for 1 < = n < = 100 .
(define (solve)
(length
(filter (lambda (x) (> x 1000000))
(map
(lambda (x)
(apply choose x))
(filter (lambda (x) (>= (first x) (second x)))
... | |
aa304b69e61b24165807631697d730f6bacd0e5a61eda304653c12b85d2d1122 | LightTable/LightTable | statusbar.cljs | (ns lt.objs.statusbar
"Provide statusbar functionality e.g. current line and column.
Statusbar is close to the bottom but above bottombar"
(:require [lt.object :as object]
[lt.objs.tabs :as tabs]
[lt.objs.canvas :as canvas]
[lt.objs.command :as cmd]
[lt.objs.bottomb... | null | https://raw.githubusercontent.com/LightTable/LightTable/3b36b7bbf3737e1fdace5beb72b92f2d5fbe01e7/src/lt/objs/statusbar.cljs | clojure | **********************************************************
statusbar container
**********************************************************
**********************************************************
statusbar
**********************************************************
****************************************************... | (ns lt.objs.statusbar
"Provide statusbar functionality e.g. current line and column.
Statusbar is close to the bottom but above bottombar"
(:require [lt.object :as object]
[lt.objs.tabs :as tabs]
[lt.objs.canvas :as canvas]
[lt.objs.command :as cmd]
[lt.objs.bottomb... |
24b0fdcf8801ebb673eb665042c4483645d8cbdb84ca985a32edf2c4d4a2704d | dennismckinnon/Ethereum-Contracts | Swarum.lsp | ;API
;
New Thread - Permission Required : 0 ( Can set to 1 if we want to restrict posting )
- Form : " newt " " Title "
- Returns : 0/1 ( fail / succeed )
;
New Post - Permission Required : 0 ( Can set to 1 if we want to restrict posting )
- Form : " newp " 0xThreadIdentifier 0xData(64Bytes )
... | null | https://raw.githubusercontent.com/dennismckinnon/Ethereum-Contracts/25b5e7037da382dd95a1376fad81f936f6610b36/Swarum/Swarum.lsp | lisp | API
Structure
Threads Linked list
The Threads linked list starts @@0x11 an pushes downward. So the newest thread will always
be at the start of the list.
Posts linked list
Thread. Similar to the threads linked list, further down the list = older posts.
+3 : Title[0,1F]
+5 : number of posts
+6 : Pointer to newest... | New Thread - Permission Required : 0 ( Can set to 1 if we want to restrict posting )
- Form : " newt " " Title "
- Returns : 0/1 ( fail / succeed )
New Post - Permission Required : 0 ( Can set to 1 if we want to restrict posting )
- Form : " newp " 0xThreadIdentifier 0xData(64Bytes )
- Ret... |
dffae5b0382772d32a81ba7906e606568959c08d39ae36cd420070f060e08135 | corecursive/sicp-study-group | exercise-3.6.scm | Exercise 3.6 .
;;
;; It is useful to be able to reset a random-number generator to
;; produce a sequence starting from a given value. Design a new rand
;; procedure that is called with an argument that is either the symbol
;; generate or the symbol reset and behaves as follows: (rand
;; 'generate) produces a new rand... | null | https://raw.githubusercontent.com/corecursive/sicp-study-group/0bd283c936f641a1e41dba04369d009a225847d5/wulab/exercises/exercise-3.6.scm | scheme |
It is useful to be able to reset a random-number generator to
produce a sequence starting from a given value. Design a new rand
procedure that is called with an argument that is either the symbol
generate or the symbol reset and behaves as follows: (rand
'generate) produces a new random number; ((rand 'reset)
<n... | Exercise 3.6 .
(define random-init (real-time-clock))
(define (rand-update x)
(let ((a 1299817)
(b 1299821)
(m 1299827))
(modulo (+ (* a x) b) m)))
(define (make-rand)
(define x random-init)
(define (generate)
(set! x (rand-update x))
x)
(define (reset new-value)
(set! x new... |
3c449ee602f3a36a9086624f05305a675d1c976e69a6194c25a5f3d8a0ddcf18 | ArulselvanMadhavan/haskell-first-principles | ex3.hs | module Ex3 where
import Data.Char
filterUpper :: String -> String
filterUpper s =
filter isUpper s
capitalize :: String -> String
capitalize s =
case s of
[] -> []
x: xs -> toUpper x : capitalize xs
capitalizedHead :: String -> Char
capitalizedHead =
toUpper . head
| null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter9/src/ex3.hs | haskell | module Ex3 where
import Data.Char
filterUpper :: String -> String
filterUpper s =
filter isUpper s
capitalize :: String -> String
capitalize s =
case s of
[] -> []
x: xs -> toUpper x : capitalize xs
capitalizedHead :: String -> Char
capitalizedHead =
toUpper . head
| |
0611ea90b1852a7e73ff59e7416692af1726453c8e2c4758df662617be2b1f39 | elaforge/karya | PPrint.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
{-# LANGUAGE PackageImports #-}
| This is based on gleb.alexeev\@gmail.com 's ipprint package on hackage .
I 'm not just using it directly because I want to pass custom formattin... | null | https://raw.githubusercontent.com/elaforge/karya/0a44446d93f3f8b8966e25f081137684d8655fc3/Util/PPrint.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
# LANGUAGE PackageImports #
* util
* showable
| Pretty show.
* String
| Pretty up haskell value, unless it's a string, in which case return it
directly.
Previously I needed this in the REPL since it didn... | Copyright 2013
| This is based on gleb.alexeev\@gmail.com 's ipprint package on hackage .
I 'm not just using it directly because I want to pass custom formatting
flags because my terminal is 80 chars wide , not the 137 - whatever default .
I'm not just using it directly because I want to pas... |
1c466060a117426aa18207fa8d15aaffdef2741079c4bb4bca0ebcbde8516a5c | clojurecup2014/parade-route | test_helper.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_helper.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
Utility functions shared by various tests in the Clojure
Created 04 November 2010
(ns clojure.test-helper
(:use clojure.test)
( System / getProperty " line.separator " ) ]
(defn temp-ns
"Create and return a temporary ns, using clojure.core + uses"
[& use... |
b570fed862e64cede04cd2272d972ffedd91477cd440af0dc58f958b7c21449b | qnikst/imagemagick | basic2.hs | # LANGUAGE FlexibleContexts #
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import qualified Data.Vector.Storable as V
import Filesystem.Path.CurrentOS
import Graphics.ImageMagick.MagickWand
import System.Env... | null | https://raw.githubusercontent.com/qnikst/imagemagick/bc9e7ac85749f42a87901b722c5d36a8bed07d5c/examples/basic2.hs | haskell | Example application for making contrast image
- Example is taken from imagemagick documentation
unless tR throw | # LANGUAGE FlexibleContexts #
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import qualified Data.Vector.Storable as V
import Filesystem.Path.CurrentOS
import Graphics.ImageMagick.MagickWand
import System.Env... |
df4fa109ed8adb9777437e13e50e7b818cd5311459fc4c2588005b16ac878701 | marick/fp-oo | recursion-2.clj | Exercise 2
(def factorial-1
(fn [n so-far]
(if (or (= n 0)
(= n 1))
so-far
(factorial-1 (dec n) (* n so-far)))))
(def factorial
(fn [n] (factorial-1 n 1)))
(prn (factorial 0))
(prn (factorial 1))
(prn (factorial 5))
| null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/recursion-2.clj | clojure | Exercise 2
(def factorial-1
(fn [n so-far]
(if (or (= n 0)
(= n 1))
so-far
(factorial-1 (dec n) (* n so-far)))))
(def factorial
(fn [n] (factorial-1 n 1)))
(prn (factorial 0))
(prn (factorial 1))
(prn (factorial 5))
| |
1bc326b6a7a40c025dcad98bda4450ca8e6dcf7ebaa94d4035950ba95140037e | dpiponi/Moodler | test_crush.hs | do
restart
root <- getRoot
let out = "out"
let keyboard = "keyboard"
let trigger = "trigger"
adsr0 <- new' "adsr"
alias1 <- new' "alias"
audio_id2 <- new' "audio_id"
audio_id3 <- new' "audio_id"
audio_id4 <- new' "audio_id"
audio_saw5 <- new' "audio_saw"
audio_sin6 <- new... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/saves/test_crush.hs | haskell | do
restart
root <- getRoot
let out = "out"
let keyboard = "keyboard"
let trigger = "trigger"
adsr0 <- new' "adsr"
alias1 <- new' "alias"
audio_id2 <- new' "audio_id"
audio_id3 <- new' "audio_id"
audio_id4 <- new' "audio_id"
audio_saw5 <- new' "audio_saw"
audio_sin6 <- new... | |
7bb7c26fee8cb0ed34427e299afdbd0135204e1b5c6f59fc4a13295d6f59cc08 | exercism/erlang | example.erl | -module(example).
-export([best_hands/1]).
-spec best_hands([string()]) -> [string()].
best_hands(Hands) ->
HandScores = [ {eval_hand(Hand), Hand} || Hand <- Hands ],
{MaxScore, _} = lists:max(HandScores),
[ Hand || {Score, Hand} <- HandScores, Score =:= MaxScore ].
%% for a given hand, come up with a ter... | null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/poker/.meta/example.erl | erlang | for a given hand, come up with a term that can be directly compared to
a term representing another hand
consequent integers represent the ranks of the cards in the order of
decreasing importance for the particular combination | -module(example).
-export([best_hands/1]).
-spec best_hands([string()]) -> [string()].
best_hands(Hands) ->
HandScores = [ {eval_hand(Hand), Hand} || Hand <- Hands ],
{MaxScore, _} = lists:max(HandScores),
[ Hand || {Score, Hand} <- HandScores, Score =:= MaxScore ].
the first integer of a list represent... |
bad9d668eb8704bdafd8fbc0c7f54876544719f6a30644757cc4c5ae1533036b | fujita-y/ypsilon | derived.scm | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(define warning-contract-violation
(lambda (form inits lst)
(for-each
(lambda (var)
(display-warning
(format "warning: binding construct may attempt to refe... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/8b9cea4b59651e4bfd187db9d2e9ec68e2590e2d/heap/boot/macro/derived.scm | scheme | See LICENSE file for terms and conditions of use. | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(define warning-contract-violation
(lambda (form inits lst)
(for-each
(lambda (var)
(display-warning
(format "warning: binding construct may attempt to reference uninitialized variable ~u" var)
form
... |
4d5d5200745bfbf18d75a24952e82993a77183c26c855d8d7c46d42a91e31d53 | chethan/SICP | Set.hs | element_of_set elem (xs) = foldr (\x acc -> acc || (x==elem)) False xs
adjoin_set elem xs | (element_of_set elem xs) = xs
| otherwise = elem:xs
intersection_set set1 set2 = let
step x acc | element_of_set x set1 = x:acc
| otherwise = acc
in foldr step [] set2
... | null | https://raw.githubusercontent.com/chethan/SICP/ff83adc7e3e89e299c772080d32103f72ecf5dbf/Chapter2/Set.hs | haskell | element_of_set elem (xs) = foldr (\x acc -> acc || (x==elem)) False xs
adjoin_set elem xs | (element_of_set elem xs) = xs
| otherwise = elem:xs
intersection_set set1 set2 = let
step x acc | element_of_set x set1 = x:acc
| otherwise = acc
in foldr step [] set2
... | |
4bc6067dd1c571d1e375500f179be4ca0a73ae63af0353f8c5ab5c9090053f08 | well-typed/recover-rtti | Sized.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNType... | null | https://raw.githubusercontent.com/well-typed/recover-rtti/57c45f9352cda7e385ef9b4c525dbd7b9f979e32/tests/Test/RecoverRTTI/QuickCheck/Sized.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DerivingStrategies #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
| Sized generators
Intended for qualified import
* Sized generators
* Lift... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
> import Test . RecoverRTTI.QuickCheck . Sized ( SizedGen )
> import qualified Test . RecoverRTTI.QuickCheck . ... |
72d355fe792fac2632d3d3b7e0817fdef5f5dbe78765a0415b23d6771ccbb9e6 | rescript-lang/rescript-compiler | belt_SortArray.mli |
Copyright ( C ) 2017 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version ... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/belt_SortArray.mli | ocaml | * A module for Array sort relevant utiliites
*
`isSorted(arr, cmp)`: Returns true if array is increasingly sorted (equal is okay)
*
`stableSortBy(xs, cmp)`: Returns a fresh array Sort `xs` in place using
comparator `cmp`, the stable means if the elements are equal, their order will
be preserved
*/*
*/* |
Copyright ( C ) 2017 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version ... |
f3779a1b1a3d040f46f4b64de855ec83a99a8d25b8c5e6f2bc13e1ffc2a9dbcc | janestreet/universe | sexpable.ml | module type S = sig
type t
val t_of_sexp : Sexp.t -> t
val sexp_of_t : t -> Sexp.t
end
module type S1 = sig
type 'a t
val t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
end
module type S2 = sig
type ('a, 'b) t
val t_of_sexp : (Sexp.t -> 'a) -> (Sexp.t ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexplib0/src/sexpable.ml | ocaml | module type S = sig
type t
val t_of_sexp : Sexp.t -> t
val sexp_of_t : t -> Sexp.t
end
module type S1 = sig
type 'a t
val t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
end
module type S2 = sig
type ('a, 'b) t
val t_of_sexp : (Sexp.t -> 'a) -> (Sexp.t ... | |
aef0548c5abbd657daed0a4737ab13dbfd9d144c27c87d2b43a08955314ac9e9 | project-oak/hafnium-verification | main.ml |
* Copyright 2020
*
* Licensed under the Apache License , Version 2.0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* -2.0
*
* Unless required by applicable law or agreed to in writing , software
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/HafniumCore/extract/main.ml | ocaml | ^ padding ^ (foo (padding ^ " ") fallback)
print_string "<DEBUG> " ; print_string (cl2s msg) ;
* print_endline (string_of_vals vs) ;
print_endline "yielding" ; |
* Copyright 2020
*
* 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
... |
0c529836024180755ec61051003cb87fa4ad46ec09a341cce245e11dc902b686 | foreverbell/project-euler-solutions | 371.hs | import qualified Data.Array.Unboxed as A
import qualified Data.Array.MArray as MA
import Data.Array.ST (runSTUArray)
import Data.Ix (Ix)
import Control.Monad (forM_)
import Text.Printf (printf)
import Common.Utils (modifyArray, initArray)
type DPArray = A.UArray (Int, Bool) Dou... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/371.hs | haskell | import qualified Data.Array.Unboxed as A
import qualified Data.Array.MArray as MA
import Data.Array.ST (runSTUArray)
import Data.Ix (Ix)
import Control.Monad (forM_)
import Text.Printf (printf)
import Common.Utils (modifyArray, initArray)
type DPArray = A.UArray (Int, Bool) Dou... | |
3a595e77e4718953814b52444bc39d9f7c18fc9bbbe197ae8cbdf06d302c90a6 | YouTakaoka/Topos | Parser.hs | module Parser where
type Parser a = [a] -> Maybe (a, [a], [a])
_divList :: (a -> Bool) -> [a] -> Parser a
_divList p (x : xs1) xs2 -- xs2 には初期値 [] を入れる
| p x = Just (x, xs2, xs1)
| otherwise = _divList p xs1 (xs2 ++ [x])
_divList _ [] _ = Nothing
divList :: (a -> Bool) -> Parser a
divList p xs = _divLi... | null | https://raw.githubusercontent.com/YouTakaoka/Topos/258b672ddd17ca80e14cfb5675785105ceaa4dc2/src/Parser.hs | haskell | xs2 には初期値 [] を入れる
res は初期値 [] | module Parser where
type Parser a = [a] -> Maybe (a, [a], [a])
_divList :: (a -> Bool) -> [a] -> Parser a
| p x = Just (x, xs2, xs1)
| otherwise = _divList p xs1 (xs2 ++ [x])
_divList _ [] _ = Nothing
divList :: (a -> Bool) -> Parser a
divList p xs = _divList p xs []
divListBy :: Eq a => a -> Parser a... |
c429d24c2ed38eb8853ce79837eb8d810fdde591f95d138eef47c8d79db1f35a | codinuum/cca | lib.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/otreediff/src/lib.ml | ocaml | lib.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... |
f025e43080ba0cf172c8175935359d5f0e9f766e23a891456c3664f3bdf058c3 | pjones/xmonadrc | Keys.hs | -- |
--
-- Copyright:
-- This file is part of the package xmonadrc. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
--
-- No part of this package, including this file, may be copied,
-- modified, propagated, or distributed ex... | null | https://raw.githubusercontent.com/pjones/xmonadrc/c19f77f3a2625a24d1b7fb623bcdde3a241bc508/src/XMonad/Local/Keys.hs | haskell | |
Copyright:
This file is part of the package xmonadrc. It is subject to the
license terms in the LICENSE file found in the top-level
directory of this distribution and at:
No part of this package, including this file, may be copied,
modified, propagated, or distributed except according to the
te... |
module XMonad.Local.Keys (keys, rawKeys) where
import qualified Data.Map as M
import Graphics.X11.Xlib
import System.Directory
import System.FilePath ((</>))
import XMonad hiding (keys)
import XMonad.Actions.CopyWindow (kill1)
import XMonad.Actions.DynamicProjects (switchProjectPrompt)
import XMonad.Actions.Gro... |
263d356ff6a79329166da6d80c8724be95b6d7f75389424d2aea9fd3530be0c9 | gilith/hol-light | inverse_bug_puzzle_miz3.ml | (* ========================================================================= *)
( c ) Copyright , 2013
Distributed under the same license as HOL Light
(* *)
(* Proof of t... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Examples/inverse_bug_puzzle_miz3.ml | ocaml | =========================================================================
Proof of the Bug Puzzle conjecture of the HOL Light tutorial:
the definition of move, which defines a closed subset
and also a res... | ( c ) Copyright , 2013
Distributed under the same license as HOL Light
Any two triples with the same oriented area can be connected in
5 moves or less ( FiveMovesOrLess ) . Also a proof that 4 moves is not
enough , with... |
131414d2899c8fb5d08d29a51789cc826d204376ba8355a39a762beeb99651e0 | falgon/htcc | Core.hs | |
Module : Htcc . Asm . Generate . Core
Description : The modules of intrinsic ( x86_64 ) assembly
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The modules of intrinsic ( x86_64 ) assembly
Module : Htcc.Asm.Generate.Cor... | null | https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/Asm/Generate/Core.hs | haskell | # INLINE prologue #
| data section of assembly code
| text section of assembly code | |
Module : Htcc . Asm . Generate . Core
Description : The modules of intrinsic ( x86_64 ) assembly
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The modules of intrinsic ( x86_64 ) assembly
Module : Htcc.Asm.Generate.Cor... |
98531a28840126f68648b35e186e7662e0da8a7246c958d56a5454e6a0c0aac9 | c4-project/c4f | output.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz/src/output.mli | ocaml | * The raw output of a fuzzer runner.
* Type of output. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
9d4c115b6847a4e0180e59d0578e3dd0213ea3e5af66128fd5443030ca299115 | simon-katz/lein-nomis-ns-graph | quil_animation_play.cljs | (ns nomisdraw.play.quil-animation-play
(:require [nomisdraw.utils.nomis-quil-on-reagent :as qor]
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[re-com.core :as re]))
(defn ^:private my-sketch [w h]
(letfn [(initial-state []
{:time 1})
(upda... | null | https://raw.githubusercontent.com/simon-katz/lein-nomis-ns-graph/e30d8af3022ee1d9b1c49571847925c45617e66b/test-resources/example-projects/nomisdraw/src/cljs/nomisdraw/play/quil_animation_play.cljs | clojure | (ns nomisdraw.play.quil-animation-play
(:require [nomisdraw.utils.nomis-quil-on-reagent :as qor]
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[re-com.core :as re]))
(defn ^:private my-sketch [w h]
(letfn [(initial-state []
{:time 1})
(upda... | |
0eb245dda7d78c7642826e4df9cdc24e4e8783122a895b349e093cb3a709aed3 | fgatherlet/cl-webdriver | package.lisp | package.lisp
(defpackage webdriver
(:use
:cl
:series
:lol
;;:trivia
)
(:shadowing-import-from
:series
:split
:choose
)
(:import-from
:alexandria
:with-gensyms
:assoc-value
:if-let
:when-let
:when-let*
)
(:export
;;; ------------------------------ base-uti... | null | https://raw.githubusercontent.com/fgatherlet/cl-webdriver/80acda412f8da718b3379c78dc5f59199836ea7d/src/package.lisp | lisp | :trivia
------------------------------ base-utility
:wd-compile-actions
------------------------------ configuration
------------------------------ primitive-api. http (get post delete)
------------------------------ 8. session
----
------------------------------ wrapper-for-primitive-api.
----
----
----
:wd-e... | package.lisp
(defpackage webdriver
(:use
:cl
:series
:lol
)
(:shadowing-import-from
:series
:split
:choose
)
(:import-from
:alexandria
:with-gensyms
:assoc-value
:if-let
:when-let
:when-let*
)
(:export
:protocol-error
:wd-obj
:wd-ref
:wd-make-cook... |
72eccff291473fcd93e3d0c0c8f49bcea79506717b657469ff592ce338824c1a | semilin/layoup | rollmak-ex.lisp |
(MAKE-LAYOUT :NAME "rollmak-ex" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/rollmak-ex.lisp | lisp |
(MAKE-LAYOUT :NAME "rollmak-ex" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | |
5cc62683742879e2eed0f7ffe94f5bd65b277e645aba24be9d0734f977351da3 | huangjs/cl | plisp-compile.lisp |
;;; This builds an executable postscript compiler
(load "vars") ; has defvars
(load "macros") ; useful macros
(compile-file "top") ; top level control
(compile-file "compile") ; guts of the compilation process
(compile-file "output") ; output routines
(compile-file "defps") ; definitions of postscript ... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/plisp/compiler/plisp-compile.lisp | lisp | This builds an executable postscript compiler
has defvars
useful macros
top level control
guts of the compilation process
output routines
definitions of postscript functions
Simple-minded iteration through the common-lisp directory -
may need changing depending of OS |
(compile-file "args")
(compile-file "names")
(compile-file "flow")
(compile-file "util")
(let ((dir "common-lisp/"))
(dolist (x '("bind" "control" "functional" "lisp-util"
"loop" "mvalues" "numeric" "for"))
(compile-file (concatenate 'string dir x))))
|
4855809943643b0e192bfe44fab719d8f17e955d809ff6d295e541986adb365b | skanev/playground | 74.scm | SICP exercise 2.74
;
Insatiable Enterprises , Inc. is a highly decentralized conglomerate
; consisting of a large number of independent divisions located all over the
; world. The company's computer facilities have just been interconnected by
; means of a clever network-interfacing scheme that makes the entire netw... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/74.scm | scheme |
consisting of a large number of independent divisions located all over the
world. The company's computer facilities have just been interconnected by
means of a clever network-interfacing scheme that makes the entire network
appear to any user to be a single computer. Insatiable's president, in her
first attempt t... | SICP exercise 2.74
Insatiable Enterprises , Inc. is a highly decentralized conglomerate
that , alhough all the division files have been implemeted as data structures
it as an s - expr , as opposed to having a specific set module . We 'll have two
(define atreides
'(("Paul Atreides"
((salary 2000)
... |
32de5e2d45062b33d825d228d51d62f5b1be1c8076ed4160ddf706949982cdff | robrix/starlight | TextureUnit.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module GL.TextureUnit
( TextureUnit(..)
, setActiveTexture
) where
import Control.Monad.IO.Class.Lift
import Foreign.Storable
import GL.Type as GL
import GL.Uniform
import Graphics.GL.Core41
import Graphics.GL.Types
newtype TextureUnit = TextureUnit { unTextureUnit :: GLint }
... | null | https://raw.githubusercontent.com/robrix/starlight/ad80ab74dc2eedbb52a75ac8ce507661d32f488e/src/GL/TextureUnit.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module GL.TextureUnit
( TextureUnit(..)
, setActiveTexture
) where
import Control.Monad.IO.Class.Lift
import Foreign.Storable
import GL.Type as GL
import GL.Uniform
import Graphics.GL.Core41
import Graphics.GL.Types
newtype TextureUnit = TextureUnit { unTextureUnit :: GLint }
... | |
38b6398ebec9aeac51c4e71dfa1ddd797fd461109a11736722565be7a0603815 | calvis/cKanren | eigen.rkt | #lang racket
(require "src/base.rkt" "tree-unify.rkt"
"attributes.rkt" "neq.rkt" "src/mk-structs.rkt"
"src/framework.rkt" "src/triggers.rkt")
(require "tester.rkt")
a " fresh " for EigenVars
(provide eigen)
an EigenVar is just a special kind of Var
(define-var-type eigenvar "ev"
#:methods gen... | null | https://raw.githubusercontent.com/calvis/cKanren/8714bdd442ca03dbf5b1d6250904cbc5fd275e68/cKanren/eigen.rkt | racket | EigenVar [List-of Var] -> ConstraintTransformer
fails when x is involved in unification of variables not in scope
track any change in scope by responding to #f
track associations to x
[List-of Value] -> [List-of Var]
EigenVar SubstitutionPrefix [List-of Var] -> ConstraintTransformer
the prefix is a list of eithe... | #lang racket
(require "src/base.rkt" "tree-unify.rkt"
"attributes.rkt" "neq.rkt" "src/mk-structs.rkt"
"src/framework.rkt" "src/triggers.rkt")
(require "tester.rkt")
a " fresh " for EigenVars
(provide eigen)
an EigenVar is just a special kind of Var
(define-var-type eigenvar "ev"
#:methods gen... |
16441543586f2e0b8069edc9d9d204b3a07c02759ba928f7ae6d2972c2390724 | disteph/cdsat | BV.ml | open Top
module Known = struct
let known =
let open Symbols in
function
| Conc _ | Extract _ | CstBV _
| Eq (Sorts.BV _)
| NEq (Sorts.BV _)
-> true
| _ -> false
end
include Generic.Make(Known)
| null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/termstructures.mld/VarSet.mld/BV.ml | ocaml | open Top
module Known = struct
let known =
let open Symbols in
function
| Conc _ | Extract _ | CstBV _
| Eq (Sorts.BV _)
| NEq (Sorts.BV _)
-> true
| _ -> false
end
include Generic.Make(Known)
| |
ec2839861b8b2c8473ee576972ad3c6d9a33edf3bf655d4bcb52b906c38bdf95 | webyrd/n-grams-for-synthesis | implementation.157.scm | Copyright ( C ) ( 2017 ) . All Rights Reserved .
;; 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,
... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-155/srfi/155/implementation.157.scm | scheme | 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 copies
furnished to do so, subject to the following conditions:
... | Copyright ( C ) ( 2017 ) . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K... |
1b20c076c5f50d1e156d3ee650a88370d6edb44650ff381ce6cdc9b8ae843362 | racket/racket7 | residual.rkt | #lang racket/base
(require (for-syntax racket/base)
racket/stxparam
racket/lazy-require
racket/private/promise)
;; ============================================================
;; Compile-time
(require (for-syntax racket/private/sc "residual-ct.rkt"))
(provide (for-syntax (all-from-out "resi... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/syntax/parse/private/residual.rkt | racket | ============================================================
Compile-time
== from runtime.rkt
============================================================
Run-time
== from runtime.rkt
this-syntax
Bound to syntax being matched inside of syntax class
this-context-syntax
Bound to (expression that extracts) conte... | #lang racket/base
(require (for-syntax racket/base)
racket/stxparam
racket/lazy-require
racket/private/promise)
(require (for-syntax racket/private/sc "residual-ct.rkt"))
(provide (for-syntax (all-from-out "residual-ct.rkt")))
(begin-for-syntax
(provide make-attribute-mapping
a... |
a103802e2965dd214e0d4766aa5d8df232c284d3513e0d9eddb1f9d68215b3a7 | jasonstolaruk/CurryMUD | LiqIds.hs | # OPTIONS_GHC -Wno - missing - signatures #
module Mud.TheWorld.LiqIds where
import Mud.Data.State.MudData (Id)
iLiqOil = 0 :: Id
iLiqWater = 1 :: Id
iLiqPotHp = 100 :: Id
iLiqPotInstantHp = 101 :: Id
iLiqPotMp = 102 :: Id
iLiqPotInstantMp = 103 ... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/TheWorld/LiqIds.hs | haskell | # OPTIONS_GHC -Wno - missing - signatures #
module Mud.TheWorld.LiqIds where
import Mud.Data.State.MudData (Id)
iLiqOil = 0 :: Id
iLiqWater = 1 :: Id
iLiqPotHp = 100 :: Id
iLiqPotInstantHp = 101 :: Id
iLiqPotMp = 102 :: Id
iLiqPotInstantMp = 103 ... | |
0b270d50c3782aec8672bacbaaa243bcea14cbde55f6f5d67d265b5a136327d3 | Apress/haskell-quick-syntax-reference | ch11.hs | data MyData = Zero | Double Int
g :: MyData -> Int
g Zero = 0
g (Double x) = 2*x
associate :: Eq a => a -> [(a, t)] -> [t]
associate character xs = [y | (x,y) <- xs , x == character]
| null | https://raw.githubusercontent.com/Apress/haskell-quick-syntax-reference/8bcb2773532de752d6297a91a3aaf49fd92ed03b/ch11.hs | haskell | data MyData = Zero | Double Int
g :: MyData -> Int
g Zero = 0
g (Double x) = 2*x
associate :: Eq a => a -> [(a, t)] -> [t]
associate character xs = [y | (x,y) <- xs , x == character]
| |
3b32f2c2f8b6885ed8272b863fea3465adcaa9d1dc8ea1ffdc6786a5af001cd7 | spechub/Hets | GenericSequent.hs | |
Module : $ EmptyHeader$
Description : < optional short description entry >
Copyright : ( c ) < Authors or Affiliations >
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < email >
Stability : unstable | experimental | provisional | stable | frozen
Portability : ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/GMP/GenericSequent.hs | haskell | | Generate all possible clauses out of a list of atoms
| Extract the modal atoms from a formula
| Generic Provability Function
| Generic Satisfiability Function
| Function for "normalizing" negation | |
Module : $ EmptyHeader$
Description : < optional short description entry >
Copyright : ( c ) < Authors or Affiliations >
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < email >
Stability : unstable | experimental | provisional | stable | frozen
Portability : ... |
889b210a04da76c52e7d95e9b81f51262e34815f15f1a819f3ca79f0e6a0bde6 | chordify/redis-schema | Schema.hs | {-# LANGUAGE Strict #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE DerivingStrategies #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE TypeApplications #
# LANGUAGE QuantifiedConstraints... | null | https://raw.githubusercontent.com/chordify/redis-schema/017048f67d5c13ee1b27da4fa41faf7669c4aba4/src/Database/Redis/Schema.hs | haskell | # LANGUAGE Strict #
# LANGUAGE GADTs #
# LANGUAGE DeriveAnyClass #
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
| The schema-based Redis module.
This module is intended to be imported qualified.
Pool and RedisM export their internals so other libraries can provide combinators
like runNonBlocking or others... | # LANGUAGE LambdaCase #
# LANGUAGE DerivingStrategies #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DefaultSignatures #
# LANGUAGE A... |
227cb3b93dc9fb445c48d0d12abaaa41545647f16f1b41d5e82a6ed0699f26f5 | adamschoenemann/clofrp | EveryOther.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleContexts , FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module... | null | https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/benchmark/EveryOther.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
[hsclofrp|
data StreamF (k : Clock) a f = Cons a (|>k f) deriving Functor.
type Stream (k : Clock) a = Fix (StreamF k a).
data CoStream a = Cos (forall (kappa : Clock). Stream kappa a).
cos : forall (k : Clock) a. a -> |>k (CoStream a) -> CoStream a... | # LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleContexts , FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
module EveryOther (trans, exec) where
import Prelude hiding (fst, snd, ... |
e9d530f53192888735893a5f5741d4bff3b3ecff7074df340964e6b5f04174e2 | rabbitmq/rabbitmq-common | rabbit_authz_backend.erl | 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 /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_authz_backend).
-include("rabbit.... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-common/67c4397ffa9f51d87f994aa4db4a68e8e95326ab/src/rabbit_authz_backend.erl | erlang |
Check that a user can log in, when this backend is being used for
authorisation only. Authentication has already taken place
successfully, but we need to check that the user exists in this
backend, and initialise any impl field we will want to have passed
back in future calls to check_vhost_access/3 and
check_r... | 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 /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_authz_backend).
-include("rabbit.hrl").... |
ac465ae33ab8bed6740b0efd85902ad47f5f87fba73ea00dba622aa6a26aa221 | josefs/Gradualizer | listsspecs.erl | -module(listsspecs).
-compile([export_all, nowarn_export_all]).
-spec append([integer()]) -> [integer()].
append(X) ->
lists:append([1,2,3],X).
-spec delete() -> [integer()].
delete() ->
lists:delete(1,[1,2,3]).
-spec droplast() -> [integer()].
droplast() ->
lists:droplast([1]).
-spec dropwhile() -> [i... | null | https://raw.githubusercontent.com/josefs/Gradualizer/22a8e19f1c88a00399eaeda41cf8ddde302061bd/test/should_pass/listsspecs.erl | erlang | -module(listsspecs).
-compile([export_all, nowarn_export_all]).
-spec append([integer()]) -> [integer()].
append(X) ->
lists:append([1,2,3],X).
-spec delete() -> [integer()].
delete() ->
lists:delete(1,[1,2,3]).
-spec droplast() -> [integer()].
droplast() ->
lists:droplast([1]).
-spec dropwhile() -> [i... | |
6bedd0f793123d029a06e70ad6b9bd875ebdf0f458d67d3937c85ca29103fafb | koka-lang/koka | Options.hs | -----------------------------------------------------------------------------
Copyright 2012 - 2021 , Microsoft Research , .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
-- found in the LICENSE file at the ... | null | https://raw.githubusercontent.com/koka-lang/koka/b6f8e960bf0bacf7bd5adb78b8e524def5924efb/src/Compiler/Options.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
found in the LICENSE file at the root of this distribution.
---------------------------------------------------------------------------
Main module.
------------... | Copyright 2012 - 2021 , Microsoft Research , .
terms of the Apache License , Version 2.0 . A copy of the License can be
getOptions, processOptions, Mode(..), Flags(..), showTypeSigs
, showHelp, showEnv, showVersion, commandLineHelp, showIncludeInfo
... |
162edb28f452056d67726ac22fd16b0ebbc41a9cd92ecd1b886c77890ddcd1fe | nomasystems/ndto | ndto_test_util.erl | Copyright 2022 Nomasystems , S.L.
%%
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
distri... | null | https://raw.githubusercontent.com/nomasystems/ndto/572fd1c58d1a8e982838005423107d76933da313/test/ndto_test_util.erl | erlang |
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 perm... | Copyright 2022 Nomasystems , S.L.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ndto_test_util).
-export([
compile/2,
is_valid/3
]).
compile(Name, Schema) ->
{tree, form_list, Attr, CommentedForms} ... |
18a4f3bb8ccf77f00da0530915649aa937ca5f5dcccb1db17be54bab4a63b2de | jtobin/speedy-slice | Rosenbrock.hs | # OPTIONS_GHC -fno - warn - type - defaults #
module Main where
import Numeric.MCMC.Slice
rosenbrock :: [Double] -> Double
rosenbrock [x0, x1] = negate (5 *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2)
main :: IO ()
main = withSystemRandom . asGenIO $ \gen -> do
_ <- chain 50 1 [0, 0] rosenbrock gen
mcmc 50 1 [0, 0... | null | https://raw.githubusercontent.com/jtobin/speedy-slice/19a3d54afab18f2b9b3dccae052dbf7d0055ea74/test/Rosenbrock.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults #
module Main where
import Numeric.MCMC.Slice
rosenbrock :: [Double] -> Double
rosenbrock [x0, x1] = negate (5 *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2)
main :: IO ()
main = withSystemRandom . asGenIO $ \gen -> do
_ <- chain 50 1 [0, 0] rosenbrock gen
mcmc 50 1 [0, 0... | |
a6d1c86309907d58af6f08bd44181f0c8a15e8151a72975150ddcd3f5f665215 | mk270/ocaml-prolog | limit.ml |
let get_limit = function
| None -> 1
| Some n -> n
let set_limit = function
| 0 -> None
| n -> Some n
let bool_of = function
| None -> false
| Some _ -> true
| null | https://raw.githubusercontent.com/mk270/ocaml-prolog/72b4d956eda1c86e35dde8e31b29977de6962120/lib/limit.ml | ocaml |
let get_limit = function
| None -> 1
| Some n -> n
let set_limit = function
| 0 -> None
| n -> Some n
let bool_of = function
| None -> false
| Some _ -> true
| |
0ab4a1beb7611644b08d24b0f2719b26f72a20c636fd9ae53c4aba469e09932d | hopv/MoCHi | refine.mli |
*
exception CannotRefute
val refine :
string list ->
(Fpat.Idnt.t -> bool) ->
CEGAR_syntax.ce -> CEGAR_syntax.ce list ->
((Fpat.Idnt.t * Fpat.Pred.t list) list) list ->
CEGAR_syntax.prog ->
(CEGAR_syntax.var * CEGAR_syntax.typ) list * CEGAR_syntax.prog
* [ refine prefix traces t ] で,反例のリスト [ traces ] を用... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/refine.mli | ocaml |
val remove_preds : Syntax.typed_term -> Syntax.typed_term
(** [remove_preds t] で, [t] 中の述語を削除する |
*
exception CannotRefute
val refine :
string list ->
(Fpat.Idnt.t -> bool) ->
CEGAR_syntax.ce -> CEGAR_syntax.ce list ->
((Fpat.Idnt.t * Fpat.Pred.t list) list) list ->
CEGAR_syntax.prog ->
(CEGAR_syntax.var * CEGAR_syntax.typ) list * CEGAR_syntax.prog
* [ refine prefix traces t ] で,反例のリスト [ traces ] を用... |
1500cc0900e0caed08253959923d58f6597c3fff0782b8beee6f781516d23992 | S8A/htdp-exercises | ex427.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 ex427) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex427.rkt | racket | about the language level of this file in a form that our tools can easily process.
For time comparisons
[List-of Number] -> [List-of Number]
produces a sorted version of alon without duplicates
List-of-numbers -> List-of-numbers
produces a sorted version of l without duplicates
Number List-of-numbers -> List-of-... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex427) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define SHORT (build-list 100 (lambda (n) (random 100))... |
ae1c14e11b955c3e979dfd37e3effa1cdffbef9ebc8b31026432cc75298a5b13 | GaloisInc/renovate | Internal.hs |
Module : Renovate . BinaryFormat . ELF.Common . Internal
Description : Common operations for dealing with ELF files
Copyright : ( c ) Galois , Inc 2020
License : < >
Stability : provisional
This module is exposed for testing purposes only . Do not import o... | null | https://raw.githubusercontent.com/GaloisInc/renovate/df24c65c45ea95588c08e3d36a40cfd0ad90f8d9/renovate/src/Renovate/BinaryFormat/ELF/Common/Internal.hs | haskell | | Align a value
| Align a value downwards
|
Module : Renovate . BinaryFormat . ELF.Common . Internal
Description : Common operations for dealing with ELF files
Copyright : ( c ) Galois , Inc 2020
License : < >
Stability : provisional
This module is exposed for testing purposes only . Do not import o... |
e2b451885fe7221b5c11b7606da8d8071f119afc9e184a2f86a979f5a6c27205 | racket/htdp | stop.rkt | #lang scheme
(provide (struct-out stop-the-world))
(define-struct stop-the-world (world) #:transparent)
| null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/2htdp/private/stop.rkt | racket | #lang scheme
(provide (struct-out stop-the-world))
(define-struct stop-the-world (world) #:transparent)
| |
0410d78312110531c5330fbee28a46b623e2b3b4c95c8aaa38d8518989fd7da1 | bschwb/cis194-solutions | hw04.hs | # OPTIONS_GHC -Wall #
module Homework where
import Data.List
-------------------------------------------------------------------------------
Exercise 4
Return all odd prime numbers up to 2 * @n@ + 2
sieveSundaram :: Integer -> [Integer]
sieveSundaram n = map ((+1) . (*2)) $ [1..n] \\ sieve
where sieve = map (\... | null | https://raw.githubusercontent.com/bschwb/cis194-solutions/e79f96083b6edbfed18a2adbc749c41d196d8ff7/04-higher-order/hw04.hs | haskell | -----------------------------------------------------------------------------
Return all possible pairs
-----------------------------------------------------------------------------
Returns True if and only if there are an odd number of True values contained
in the input line. It does not matter how many False value... | # OPTIONS_GHC -Wall #
module Homework where
import Data.List
Exercise 4
Return all odd prime numbers up to 2 * @n@ + 2
sieveSundaram :: Integer -> [Integer]
sieveSundaram n = map ((+1) . (*2)) $ [1..n] \\ sieve
where sieve = map (\(i, j) -> i + j + 2*i*j)
. filter (\(i, j) -> i + j + 2*i*j <= n... |
b59668731b0814c593462dee3a4e06aa77aefeb17ae4ffc0de721c77059abfb6 | earl-ducaine/cl-garnet | graphics-selection.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gadgets/graphics-selection.lisp | lisp | Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
domain. ;;;
aggregadget will cause selection squares to appear on the bounding
box of selected... | $ Id$
Graphics - Selection : Selection squares around graphic objects
Features and operation of the Graphics Selection object :
1 ) Given a list of graphical objects , the graphics - selection
2 ) Only one item may be selected at a time .
3 ) A built - in interactor displays the select... |
1f60fe13864f1b9adbb660d825b0d3872a642823f0dd6abd01a1c3713b30677b | SquidDev/illuaminate | doc_comment.mli | open IlluaminateCore
type reference = Reference.unresolved = Reference of string [@@unboxed]
include
Doc_abstract_syntax.S with type reference := reference and module Type = Type_syntax.Unresolved
(** Information about this module. *)
type module_info =
{ mod_name : string; (** The name of this module. *)
m... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/689d73ded6e6737ee3c854d0069f62d052ae628b/src/semantics/doc_comment.mli | ocaml | * Information about this module.
* The name of this module.
* This namespace of this module.
* This kind of this module.
* Information about this type/class.
* The position of this field.
* The name of this field.
* The type of this field.
* An additional description of the field.
Some general information abo... | open IlluaminateCore
type reference = Reference.unresolved = Reference of string [@@unboxed]
include
Doc_abstract_syntax.S with type reference := reference and module Type = Type_syntax.Unresolved
type module_info =
}
type type_info = { type_name : string } [@@unboxed]
* An additional field on a type , not des... |
be4315a7c7981c4deb2c6b96a6228700b648045a838a4cebfa0e6fd82d0fff4e | bobzhang/fan | FanCompile.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/FanCompile.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : compile.ml 12511 2012 - 05 - ... |
3ee6e73443e8d1df1ed4e22f8abd42fc35d8f6603e4d980e81db71e6a18b060d | IvanIvanov/fp2013 | count-pairs-tests.scm | ;;; This file contains unit tests for the problem listed in the name
;;; of this file.
;;;
;;; To run the tests specify the relative or absolute path to the
;;; ".scm" file with the proposed solution in the (load ...) command
;;; below. Then you can either open the tests and run them in Racket
( with R5RS set as the ... | null | https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab1/homework3/count-pairs-tests.scm | scheme | This file contains unit tests for the problem listed in the name
of this file.
To run the tests specify the relative or absolute path to the
".scm" file with the proposed solution in the (load ...) command
below. Then you can either open the tests and run them in Racket
directly from the command line:
plt-r5... | ( with R5RS set as the language ) , or you can run the following
assuming 's bin directory is included in the PATH environment
(load "count-pairs.scm")
(define (__make-counter x)
(lambda ()
(set! x (+ x 1))
x))
(define __test-counter (__make-counter 0))
(define (__test-passed)
(display (string-app... |
c0b810024e4b9f288657d755df0144fc6f1a2d0c542a9a1e17c8103c23fd29bb | dalaing/little-languages | SmallStep.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Component.Term.Bool.Eval.SmallStep (
smallStepInput
) where... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/b-lang/src/Component/Term/Bool/Eval/SmallStep.hs | haskell | |
^
^
|
^
^
|
^
^
^
| | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Component.Term.Bool.Eval.SmallStep (
smallStepInput
) where... |
003e2e3eff5c402008d2cc4096c0fd7f024a40d53d26f0a4a0469c2e29b9fb9e | imrehg/ypsilon | constants.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon pango constants)
(export PANGO_ATTR_ABSOLUTE_SIZE
PANGO_ATTR_BACKGROUND
PANGO_ATTR_FALLBACK
PANGO_ATTR_FAMIL... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/pango/constants.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon pango constants)
(export PANGO_ATTR_ABSOLUTE_SIZE
PANGO_ATTR_BACKGROUND
PANGO_ATTR_FALLBACK
PANGO_ATTR_FAMIL... |
fcad447709704bff992487e9059f231953ed85cd7c1f6ea2e89250c116d119ad | dstcruz/Write-Yourself-A-Scheme-In-48-Hours | exercise_1.hs | module Main where
import Char (toLower)
import Control.Monad (liftM)
import Data.Array (Array (..), listArray)
import Data.Ratio (Rational (..), (%))
import Data.Complex (Complex (..))
import Numeric (readOct, readHex)
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
data LispVal = Atom ... | null | https://raw.githubusercontent.com/dstcruz/Write-Yourself-A-Scheme-In-48-Hours/19765a03fb01d788066259d115c7798518224ad9/ch03/beginnig_evaluator/exercise_1.hs | haskell | not sure I understand the type of this function
according to ghci
Bug: this allows the unquote to appear outside of a quasiquoted list
Bug: this allows unquote-splicing to appear outside of a quasiquoted list
Show functions
Evaluator
Primitive functions lookup table
LispVal -> LispVal
Primitive helpe... | module Main where
import Char (toLower)
import Control.Monad (liftM)
import Data.Array (Array (..), listArray)
import Data.Ratio (Rational (..), (%))
import Data.Complex (Complex (..))
import Numeric (readOct, readHex)
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
data LispVal = Atom ... |
30f32a4155520a935c2ca2ace04926d9c8d4d6970b31f9db73cb30f3c089ee71 | sharplispers/montezuma | tc-m2k.lisp | tc-m2k.lisp --- M2 K bug ( issue 2 ) regression test
;;
Copyright ( C ) 2009 , Yoni Rabkin < >
;;
;; 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... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/tests/unit/regression/tc-m2k.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 copies
furnished to do so, subject to the following conditions:... | tc-m2k.lisp --- M2 K bug ( issue 2 ) regression test
Copyright ( C ) 2009 , Yoni Rabkin < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.