Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
Artist
Not many new features this week, as I've been tidying things up :) But I thought I'd tell you about the Expand operator :
Woo <:: (1,2,2,1) \ "Woes"; ttyout (Woo);
This prints "Wooees" :) The "\" (Expand) operator scans the right-hand operand , and replicates each element according to the left-hand operand, so in this example we get one W, two o's, two e's, and one s (i.e. Wooees). The left-hand operand can of course contain zeros, so if we write
Woo <:: (0,1,2,3,2,1,0) \ (1, 2, 3, 4, 5, 6, 7);
we would get (2, 3, 3, 4, 4, 4, 5, 5, 6), as the first and final elements both have zero occurrences.