Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
29
Task/Map-range/WDTE/map-range.wdte
Normal file
29
Task/Map-range/WDTE/map-range.wdte
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
let mapRange r1 r2 s =>
|
||||
+
|
||||
(at r2 0)
|
||||
(/
|
||||
(*
|
||||
(-
|
||||
s
|
||||
(at r1 0)
|
||||
)
|
||||
(-
|
||||
(at r2 1)
|
||||
(at r2 0)
|
||||
)
|
||||
)
|
||||
(-
|
||||
(at r1 1)
|
||||
(at r1 0)
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
let s => import 'stream';
|
||||
let str => import 'strings';
|
||||
|
||||
s.range 10
|
||||
-> s.map (@ enum v => [v; mapRange [0; 10] [-1; 0] v])
|
||||
-> s.map (@ print v => str.format '{} -> {}' (at v 0) (at v 1) -- io.writeln io.stdout)
|
||||
-> s.drain
|
||||
;
|
||||
Loading…
Add table
Add a link
Reference in a new issue