Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg1.func
- arg1.func(arg2 arg3)
- arg1.func(inline_arg | inline_function_body)
- arg1 op arg2
- { nilary_function_body }
- { arg1 arg2 | function_body }
- arg1.{ ... }(arg2 arg3)
- (arg op) #=> { a | arg op a } # partial application
- 'func #=> { a b | a.func } # K combinator
- [item1 item2]
- array[index1 index2]
- name = value
- arg.over(binary unary) #=> arg.binary(arg.unary)
- arg.fork(unary1 binary unary2) #=> arg.unary1.binary(arg.unary2)
- rot = { a | a.reverse.transpose }
- f = { a f | 4.range.rows('a).scan('rot).rows(f).reverse.scan('rot).mix }
- g = { a | a > (`1.keep(a.length) , a.scan(max).drop(`1)) }
- data.f(g).reduce(max).ravel.reduce(+)
- # length of longest consecutive sequence
- lcs = {a | a.over(select rise).unique.windows(2).rows(reduce(-)).over(partition (==`1)).rows(length).reduce(max) + 1}
- if((data.length < 2) data.length data.lcs)
- # palindrome
- data.downcase.over(keep member(&A, &D)).over(match reverse)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement