Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
21
Task/Function-composition/Bruijn/function-composition.bruijn
Normal file
21
Task/Function-composition/Bruijn/function-composition.bruijn
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
:import std/Number .
|
||||
|
||||
# 1x composition, bluebird combinator
|
||||
…∘… [[[2 (1 0)]]]
|
||||
|
||||
:test (((inc ∘ (mul (+2))) (+3)) =? (+7)) ([[1]])
|
||||
|
||||
# 2x composition, blackbird combinator
|
||||
…∘∘… [[[[3 (2 1 0)]]]]
|
||||
|
||||
:test (((inc ∘∘ mul) (+2) (+3)) =? (+7)) ([[1]])
|
||||
|
||||
# 3x composition, bunting combinator
|
||||
…∘∘∘… [[[[[4 (3 2 1 0)]]]]]
|
||||
|
||||
:test (((inc ∘∘∘ (add ∘∘ mul)) (+1) (+2) (+4)) =? (+7)) ([[1]])
|
||||
|
||||
# reverse composition, queer bird combinator
|
||||
…→… [[[1 (2 0)]]]
|
||||
|
||||
:test ((((mul (+2)) → inc) (+3)) =? (+7)) ([[1]])
|
||||
Loading…
Add table
Add a link
Reference in a new issue