- :string
- :block
- or :nothing
take
keep firstof elements from given collection and return the remaining ones
Parameters
take collection :string :literal :pathliteral :block :range number :integer
Returns
Examples
copystr: "some text" take str 4 ; => some take str neg 4 ; => text take 1..3 2 ; => [1 2]
copyarr: @1..10 take 'arr 3 arr ; => arr: [1 2 3]
copytake [1 2 3] 3 ; => [1 2 3] take [1 2 3] 4 ; => [1 2 3]