j
k
j a
j l
Neil Mitchell wrote:
if length (replicate 'a' 10000) == 1 then [] else head (replicate 'a' 10000) This program will use O(1) memory.
if length (replicate 'a' 10000) == 1 then [] else head (replicate 'a' 10000)
This program will use O(1) memory.
Doesn't length force evaluation of the 10000 cells? Martijn.
Back to the thread
Back to the list