September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,18 +1,17 @@
|
|||
#import system.
|
||||
#import system'collections.
|
||||
#import system'routines.
|
||||
#import extensions.
|
||||
#import extensions'text.
|
||||
import system'collections.
|
||||
import system'routines.
|
||||
import extensions.
|
||||
import extensions'text.
|
||||
|
||||
#symbol program =
|
||||
program =
|
||||
[
|
||||
#var numbers := 1 repeat &till:10 &each:n [ n ] summarize:(ArrayList new).
|
||||
var numbers := 1 repeat till:10 each(:n)( n ); summarize(ArrayList new).
|
||||
|
||||
#var summary := numbers accumulate:(Variable new:0) &with:(:a:b) [ a + b ].
|
||||
var summary := numbers accumulate(Variable new:0) with(:a:b)( a + b ).
|
||||
|
||||
#var product := numbers accumulate:(Variable new:1) &with:(:a:b) [ a * b ].
|
||||
var product := numbers accumulate(Variable new:1) with(:a:b)( a * b ).
|
||||
|
||||
#var concatenation := numbers accumulate:(String new) &with:(:a:b) [ a literal + b literal ].
|
||||
var concatenation := numbers accumulate(String new) with(:a:b)( a literal + b literal ).
|
||||
|
||||
console writeLine:summary:" ":product:" ":concatenation.
|
||||
console printLine(summary," ",product," ",concatenation).
|
||||
].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue