pkmnq — 7/11/2023, 6:38:12 AM
-- it already exists https://hackage.haskell.org/package/base-4.18.0.0/docs/Data-Function.html#v:-38-

import Data.Function
apply = (&)
squared n = n * n

main = print $ 5 & squared -- print (squared 5)
↩ repost
gilbert189 — 7/11/2023, 4:33:03 AM
-- very useless
apply x = \y -> y x

main = (apply "h") putStrLn
♥ 3 ↩ 1 💬 0 comments
♥ 1 ↩ 0 💬 0 comments

comments

no comments