RosettaCodeData/Task/Substring-Top-and-tail/PicoLisp/substring-top-and-tail.l
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

8 lines
234 B
Text

: (pack (cdr (chop "knight"))) # Remove first character
-> "night"
: (pack (head -1 (chop "socks"))) # Remove last character
-> "sock"
: (pack (cddr (rot (chop "brooms")))) # Remove first and last characters
-> "room"