POV-Ray : Newsgroups : povray.off-topic : An explanation of what next_permutation does : Re: An explanation of what next_permutation does Server Time
4 Sep 2024 17:22:03 EDT (-0400)
  Re: An explanation of what next_permutation does  
From: Invisible
Date: 4 Dec 2009 10:57:47
Message: <4b19317b$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.