bottom/unconditionally false in Haskell

I just ran into this formula head = foldr (<<) ⊥ where x << y = x in Bird and Gibbons' *Algorithm Design with Haskell* and I understand it's a sort of pseudo-code. Intuitively, I understand that foldr will take "bottom" as its "starter seed", but I don't know how to convert the << into Haskell code. This works myHead = foldr choose1st undefined where choose1st x y = x but I can't get myHead2 = foldr (<<) undefined where << x y = x to work. How do you create a non-alphanumeric operator like < -- ⨽ Lawrence Bottorff Grand Marais, MN, USA borgauf@gmail.com

The way it was written (infix), or wrap the operator in parentheses.
On Mon, May 31, 2021 at 12:40 PM Galaxy Being
I just ran into this formula
head = foldr (<<) ⊥ where x << y = x
in Bird and Gibbons' *Algorithm Design with Haskell* and I understand it's a sort of pseudo-code. Intuitively, I understand that foldr will take "bottom" as its "starter seed", but I don't know how to convert the << into Haskell code. This works
myHead = foldr choose1st undefined where choose1st x y = x
but I can't get
myHead2 = foldr (<<) undefined where << x y = x
to work. How do you create a non-alphanumeric operator like <
-- ⨽ Lawrence Bottorff Grand Marais, MN, USA borgauf@gmail.com _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com
participants (3)
-
Brandon Allbery
-
Galaxy Being
-
Tom Ellis