pkmnq @pkmnq
-- 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)
gilbert189 @gilbert189
-- very useless
apply x = \y -> y x

main = (apply "h") putStrLn
Jul 11, 2023, 4:33 AM
0
Jul 11, 2023, 6:38 AM
0

comments