September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,18 @@
|
|||
n:=3;
|
||||
n.pump(List) //-->L(0,1,2)
|
||||
|
||||
n.pump(List,List) //-->L(0,1,2), not expected
|
||||
because the second list can be used to describe a calculation
|
||||
n.pump(List,List(Void,List)) //--> L(L(),L(),L()) all same
|
||||
List(Void,List) means returns List, which is a "known" value
|
||||
n.pump(List,List.fpM("-")) //--> L(L(),L(),L()) all distinct
|
||||
fpM is partial application: call List.create()
|
||||
|
||||
n.pump(List,(0.0).random.fp(1)) //--> 3 [0,1) randoms
|
||||
L(0.902645,0.799657,0.0753809)
|
||||
|
||||
n.pump(String) //-->"012", default action is id function
|
||||
|
||||
class C{ var n; fcn init(x){n=x} }
|
||||
n.pump(List,C) //--> L(C,C,C)
|
||||
n.pump(List,C).apply("n") //-->L(0,1,2) ie all classes distinct
|
||||
Loading…
Add table
Add a link
Reference in a new issue