aboutsummaryrefslogtreecommitdiff
path: root/entries
diff options
context:
space:
mode:
authorBraxton Hall2022-10-24 19:38:20 +0000
committerGitHub2022-10-24 19:38:20 +0000
commit59e81fca4d450c71f10722792d36abf1b721caff (patch)
treebbc0837d1a492e1fb946c9fa6a4e6aea66b28305 /entries
parent0aa0d695f8fef33b02cbf04fbd6825bd2cbc6de1 (diff)
parenta139a04ba0a5de1c36044e3dae1c6833193d2bea (diff)
Merge branch 'main' into main
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]