RosettaCodeData/Task/Topic-variable/Zkl/topic-variable.zkl

6 lines
312 B
Plaintext

a,_,c:=List(1,2,3,4,5,6) //-->a=1, c=3, here _ is used as "ignore"
3.0 : _.sqrt() : println(_) //-->"1.73205", _ (and :) is used to "explode" a computation
// as syntactic sugar
1.0 + 2 : _.sqrt() : _.pow(4) // no variables used, the compiler "implodes" the computation
// --> 9