Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
9
Task/Filter/Sidef/filter.sidef
Normal file
9
Task/Filter/Sidef/filter.sidef
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var arr = [1,2,3,4,5];
|
||||
|
||||
# Creates a new array
|
||||
var new = arr.grep {|i| i %% 2};
|
||||
say new.dump; # => [2, 4]
|
||||
|
||||
# Destructive (at variable level)
|
||||
arr.grep! {|i| i %% 2};
|
||||
say arr.dump; # => [2, 4]
|
||||
Loading…
Add table
Add a link
Reference in a new issue