Generation

generate functionSat, 12 Nov 2022

A function that given an array of Integers returns the head of the list and keeps the tail of the list for the next call.

head :: [Integer] -> Integer head [] = error "head: Empty list" head (x:_) = x head [1,2,3]

Want to kickstart your project?Use the new AI Studio to create your code