chop

remove last item from given collection


Parameters

chop collection :string :literal :block

Attributes

times:integerremove multiple items

Returns

  • :string
  • :block
  • or  :nothing

Examples

copy
print chop "books" ; book print chop chop "books" ; boo

copy
str: "books" chop 'str ; str: "book"

copy
chop [1 2 3 4] ; => [1 2 3]

copy
chop.times: 3 "Arturo" ; Art

Related