logo
  • 教程列表
  • SO官方文檔
  • 常見的仿函式作為 cofree comonads 的基礎
    • Cofree 空空
    • Cofree(Const c)作家 c
    • Cofree 身份流
    • Cofree 也許是非空的
    • Cofree(作家 w)WriterT w Stream
    • Cofree(E e)NonEmptyT(作家 e)
    • Cofree(讀者 x)摩爾 x
  1. StackOverflow 文件
  2. Haskell Language 教程
  3. 常見的仿函式作為 cofree comonads 的基礎
  4. Cofree 也許是非空的

Cofree 也許是非空的

Created: November-22, 2018

特定

data Maybe a = Just a
             | Nothing

我們有

data Cofree Maybe a
     = a :< Just (Cofree Maybe a)
     | a :< Nothing

這是同構的

data NonEmpty a
     = NECons a (NonEmpty a)
     | NESingle a
  • Cofree(作家 w)WriterT w Stream
  • Cofree 身份流

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明