>>> length [] 0
>>> length ['a', 'b', 'c'] 3 >>> length [1..] * Hangs forever *
>>> bilength (True, 42) 2
>>> bilength (Right 42) 1
>>> bilength (BiList [1,2,3] [4,5]) 5
>>> bilength (BiList [] []) 0On infinite structures, this function hangs:
> bilength (BiList [1..] []) * Hangs forever *
>>> genericLength [1, 2, 3] :: Int 3 >>> genericLength [1, 2, 3] :: Float 3.0