aboutsummaryrefslogtreecommitdiff
path: root/entries
diff options
context:
space:
mode:
Diffstat (limited to 'entries')
-rw-r--r--entries/nritschel/assets/scratch.pngbin0 -> 752302 bytes
-rw-r--r--entries/nritschel/scratch/README.md1
-rw-r--r--entries/nritschel/scratch/fib.sb3bin0 -> 43364 bytes
-rw-r--r--entries/nritschel/xlsx/fib.xlsxbin0 -> 11704 bytes
-rw-r--r--entries/zgrannan/Fib.hs18
5 files changed, 19 insertions, 0 deletions
diff --git a/entries/nritschel/assets/scratch.png b/entries/nritschel/assets/scratch.png
new file mode 100644
index 0000000..5883245
--- /dev/null
+++ b/entries/nritschel/assets/scratch.png
Binary files differ
diff --git a/entries/nritschel/scratch/README.md b/entries/nritschel/scratch/README.md
new file mode 100644
index 0000000..e059267
--- /dev/null
+++ b/entries/nritschel/scratch/README.md
@@ -0,0 +1 @@
+<img src="../assets/scratch.png" alt="scratch preview"> \ No newline at end of file
diff --git a/entries/nritschel/scratch/fib.sb3 b/entries/nritschel/scratch/fib.sb3
new file mode 100644
index 0000000..a3cf2cc
--- /dev/null
+++ b/entries/nritschel/scratch/fib.sb3
Binary files differ
diff --git a/entries/nritschel/xlsx/fib.xlsx b/entries/nritschel/xlsx/fib.xlsx
new file mode 100644
index 0000000..e1b662d
--- /dev/null
+++ b/entries/nritschel/xlsx/fib.xlsx
Binary files differ
diff --git a/entries/zgrannan/Fib.hs b/entries/zgrannan/Fib.hs
new file mode 100644
index 0000000..1918fc8
--- /dev/null
+++ b/entries/zgrannan/Fib.hs
@@ -0,0 +1,18 @@
+-- Point-less fibonacci
+fib :: Int -> Int
+fib = fix fib'
+ where
+ fib' =
+ ap (when 0 . (0 ==)) .
+ ap (when 1 . (1 ==)) .
+ ap (ap . ((+) .) . (. subtract 1)) (. subtract 2)
+
+ when t c e = if c then t else e
+
+ ap mf m = mf >>= (\f -> m >>= return . f)
+
+ fix f = f (fix f)
+
+
+main :: IO ()
+main = mapM_ (print . fib) [0 .. 10]