Leiningen is the de facto clojure project and package manager. It can be installed via homebrew on OS X
brew install leiningen
or just download the shell script and put it on your path. If ~/bin
is on your path, then you would do:
{ | |
"name": "streamy", | |
"version": "0.0.1", | |
"dependencies": { | |
"most": "1.5.0" | |
}, | |
"devDependencies": { | |
"@types/node": "^8.0.18" | |
} | |
} |
package main | |
import ( | |
"fmt" | |
"sync" | |
"sync/atomic" | |
"unsafe" | |
) | |
type Owner unsafe.Pointer |
// See https://brianmckenna.org/blog/evenodd_agda_idris_haskell_scala | |
sealed trait Nat | |
trait Z extends Nat | |
case object Z extends Z | |
case class S[N <: Nat](n: N) extends Nat | |
sealed trait Even[N <: Nat] | |
trait EvenZ extends Even[Z] | |
case object EvenZ extends EvenZ |
# Create a fresh repo | |
$ git init testsquash | |
Initialized empty Git repository in /Users/jon/Code/Sterf/testsquash/.git/ | |
$ cd testsquash | |
# Commit a file to master | |
$ echo foo >> file | |
$ git add . |
module Interpreter | |
import Data.Fin | |
import Data.Vect | |
data Ty = TyInt | |
| TyBool | |
| TyStr | |
| TyFun Ty Ty | |
/** | |
* Copyright (c) Rich Hickey. All rights reserved. | |
* The use and distribution terms for this software are covered by the | |
* Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-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 this notice, or any other, from this software. | |
**/ |
#!/usr/bin/env zsh | |
set -e | |
function nave_version_file { | |
file="$(pwd)/.nave-version" | |
if [ -f "$file" ]; then | |
echo "$file" | |
elif `git rev-parse &>/dev/null`; then | |
file="$(git rev-parse --show-toplevel)/.nave-version" |
fs = require 'fs' | |
#request = require 'request' | |
# | |
request = ({uri}, done) -> | |
done null, uri | |
reqreq = (uris) -> | |
for uri in uris | |
yield ( (done) -> done null, uri ) |
isGen = (f) -> | |
f? and f.constructor.name is 'GeneratorFunction' | |
isIter = (f) -> | |
f? and f.constructor.name is 'GeneratorFunctionPrototype' | |
class Seq | |
constructor: (it) -> | |
if isGen it | |
@_it = it() |