GHCI says we all drink left-handed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GHCI says we all drink left-handed

Andreas Abel-2
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> data Handed = Handed
Prelude> let drink beer = beer
Prelude> all drink (Left Handed)
True

--
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

[hidden email]
http://www.cse.chalmers.se/~abela/
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHCI says we all drink left-handed

Jon Purdy
If we assume that you drink beer:

    let drink beer = True

Then we can conclude that it doesn’t matter which hand you drink with:

    all drink (Left Handed) == all drink (Right Handed) == True


On Sat, Apr 1, 2017 at 4:08 AM, Andreas Abel <[hidden email]> wrote:
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> data Handed = Handed
Prelude> let drink beer = beer
Prelude> all drink (Left Handed)
True

--
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

[hidden email]
http://www.cse.chalmers.se/~abela/
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHCI says we all drink left-handed

Jon Purdy
In reply to this post by Andreas Abel-2
If we assume that you drink beer:

    let drink beer = True

Then we can conclude that it doesn’t matter which hand you drink with:

    all drink (Left Handed) == all drink (Right Handed) == True

On Sat, Apr 1, 2017 at 4:08 AM, Andreas Abel <[hidden email]> wrote:
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> data Handed = Handed
Prelude> let drink beer = beer
Prelude> all drink (Left Handed)
True

--
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

[hidden email]
http://www.cse.chalmers.se/~abela/
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHCI says we all drink left-handed

Andreas Abel-2
Indeed.  But

   all (const True) _ == True

does not really come as surprise.  Not really usable as a joke, the
element of surprise is lacking!

On 01.04.2017 13:36, Jon Purdy wrote:

> If we assume that you drink beer:
>
>     let drink beer = True
>
> Then we can conclude that it doesn’t matter which hand you drink with:
>
>     all drink (Left Handed) == all drink (Right Handed) == True
>
> On Sat, Apr 1, 2017 at 4:08 AM, Andreas Abel <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
>     Prelude> data Handed = Handed
>     Prelude> let drink beer = beer
>     Prelude> all drink (Left Handed)
>     True
>
>     --
>     Andreas Abel  <><      Du bist der geliebte Mensch.
>
>     Department of Computer Science and Engineering
>     Chalmers and Gothenburg University, Sweden
>
>     [hidden email] <mailto:[hidden email]>
>     http://www.cse.chalmers.se/~abela/ <http://www.cse.chalmers.se/~abela/>
>     _______________________________________________
>     Libraries mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>     <http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries>
>
>

--
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

[hidden email]
http://www.cse.chalmers.se/~abela/
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Loading...