What uses have you found for higher-rank types in Haskell?

前端 未结 4 761
青春惊慌失措
青春惊慌失措 2021-01-30 23:44

Higher rank types look like great fun. From the Haskell wikibook comes this example:

foo :: (forall a. a -> a) -> (Char,Bool)
foo f = (f \'c\', f True)
         


        
4条回答
  •  死守一世寂寞
    2021-01-31 00:26

    Recently somebody asked a question here on Stack Overflow which could be solved with higher-rank types.

    Another application is in the Scrap Your Boilerplate paper.

提交回复
热议问题