[Haskell-beginners] Feature request: anonymous arguments

Yuval Langer yuval.langer at gmail.com
Sat Aug 30 10:33:51 UTC 2014


It is pattern recognition of the case for which the argument is zero. The
function will return 1 if provided with 0, but will throw a non-exhaustive
patterns in lambda exception for any other correctly typed input.
On Aug 30, 2014 1:06 PM, "Julius Gedvilas" <xged90 at gmail.com> wrote:

> \0 -> 1 :: (Num a1, Num a, Eq a) => a -> a1
>
> Actually this is fairly interesting. I need to dig into it.
>
>
> On Sat, Aug 30, 2014 at 12:59 PM, Julius Gedvilas <xged90 at gmail.com>
> wrote:
>
>> ... my bad
>>
>>
>> On Sat, Aug 30, 2014 at 12:58 PM, Karl Voelker <karl at karlv.net> wrote:
>>
>>>  On Sat, Aug 30, 2014, at 02:32 AM, Julius Gedvilas wrote:
>>>
>>> 3. Is it? *GHCi *does not recognize it.
>>>
>>>
>>> Prelude> :t \0 -> 1
>>> \0 -> 1 :: (Num a1, Num a, Eq a) => a -> a1
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> Beginners at haskell.org
>>> http://www.haskell.org/mailman/listinfo/beginners
>>>
>>>
>>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140830/2aee4fed/attachment.html>


More information about the Beginners mailing list