|
|
scott wrote:
>> ([] , _ ) -> Nothing
>
> Yeh, it's really clear what this line does to a non-Haskeller :-)
I'll tell you what it does: It makes the function crash. o_O
It *should* in fact be
(_ , [] ) -> Nothing
It seems I got my arguments the wrong way around. :-/
As for what it *means*, it means that if the prefix is empty ("[]"),
there is no next permutation ("Nothing"). The "_" simply means that it
doesn't matter what the suffix part is.
Post a reply to this message
|
|