I hereby claim:
- I am chriscoffey on github.
- I am chriscoffey (https://keybase.io/chriscoffey) on keybase.
- I have a public key ASDPQOoTwuQAk-_1qGrtFOoGRRKOSwkAYXHi-Xy1D---ugo
To claim this, I am signing this object:
module Demo where | |
import Prelude hiding (succ, pred) | |
class LambdaCalc repr where | |
lam :: (repr a -> repr b) -> repr (a -> b) | |
app :: repr (a -> b) -> repr a -> repr b | |
fix :: (repr a -> repr a) -> repr a |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
test -e ~/.coursier/cr || (mkdir -p ~/.coursier && wget -q -O ~/.coursier/cr https://git.io/vgvpD && chmod +x ~/.coursier/cr) | |
CLASSPATH="$(~/.coursier/cr fetch -q -p -r https://oss.sonatype.org/content/repositories/snapshots \ | |
\ | |
co.fs2:fs2-core_2.11:0.9.0-SNAPSHOT\ | |
co.fs2:fs2-io_2.11:0.9.0-SNAPSHOT\ | |
com.lihaoyi:ammonite-repl_2.11.7:0.5.7 \ | |
\ | |
)" java ammonite.repl.Main --predef 'import fs2._' |
$ sbt it:compile | |
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 | |
[info] Loading global plugins from /Users/ccoffey/.sbt/0.13/plugins | |
[info] Loading project definition from /Users/ccoffey/workspace/open_source/ensime-server/project | |
[info] Compiling 1 Scala source to /Users/ccoffey/workspace/open_source/ensime-server/project/target/scala-2.10/sbt-0.13/classes... | |
[info] Set current project to ensime (in build file:/Users/ccoffey/workspace/open_source/ensime-server/) | |
[info] Updating {file:/Users/ccoffey/workspace/open_source/ensime-server/}testingDebug... | |
[info] Updating {file:/Users/ccoffey/workspace/open_source/ensime-server/}testingTiming... | |
[info] Updating {file:/Users/ccoffey/workspace/open_source/ensime-server/}testingSimple... | |
[info] Updating {file:/Users/ccoffey/workspace/open_source/ensime-server/}testingEmpty... |
def primes: Stream[Long] = 2 #:: prime3 | |
// performance: avoid redundant divide by two, so this starts at 3 | |
private val prime3: Stream[Long] = { | |
def next(i: Long): Stream[Long] = | |
if (prime(i)) | |
i #:: next(i + 2) | |
else | |
next(i + 2) // tail | |
3 #:: next(5) |