【发布时间】:2015-02-19 15:31:53
【问题描述】:
作为一个简单的例子,我有这个。
import Prelude hiding ((.))
import FRP.Netwire
import Control.Wire
f :: Int -> Char -> String
f = replicate
w :: => Wire s e m Int Char
w = mkSF_ fromInt
where
fromInt :: Int -> Char
fromInt 1 = 'a'
fromInt 2 = 'b'
fromInt _ = '_'
w2 :: Wire s e m Int String
w2 = undefined -- This is where I get stuck
我希望能够创建一条从 Int 到 Strings 的连线。
我认为这应该很容易,但我没有运气。
【问题讨论】: