Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

head function:

Extract a string header. If the first argument is a string and the second argument is a positive integer, the returned value will be a string with the beginning of the first argument. See also take.

Examples:

  • running: (head "test-123", 4) will give: "test"

  • running: (head "test-123", 20) will give: "test-123"

  • running: (head 20, 20) will return nothing

  • running: (head "20", -5) will return nothing