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 23:19:19 EDT (-0400)
  Re: An explanation of what next_permutation does  
From: scott
Date: 7 Dec 2009 02:59:07
Message: <4b1cb5cb@news.povray.org>
>>>     ([] , _  ) -> Nothing
>>
>> Yeh, it's really clear what this line does to a non-Haskeller :-)
>
> It's pretty standard notation for functional languages. Erlang uses the 
> same notation. If you get a two-element tuple with the first element being 
> an empty list, the result is an arbitrary atomic value (not unlike an 
> "enum") called "Nothing".

Sure, I didn't doubt there was a pretty easy explanation behind it, it's 
just [], _ and the whole statement syntax had no meaning to me before it was 
explained.  I would imagine once Andrew knew what -- and * does in C (I 
think < and ! are common enough not to need to explain?) he would know what 
the statement he highlighted meant too.  I don't see much difference.


Post a reply to this message

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