Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何映射结果<';a、 &x27;b>;对读者<;结果<';a、 &x27;b>;在f#中?_F#_Reader Monad - Fatal编程技术网

如何映射结果<';a、 &x27;b>;对读者<;结果<';a、 &x27;b>;在f#中?

如何映射结果<';a、 &x27;b>;对读者<;结果<';a、 &x27;b>;在f#中?,f#,reader-monad,F#,Reader Monad,我有一个将函数映射到“阅读器结果”的函数,其中f是'a->'b: ('a->'b)->读卡器->读卡器 let map f=Reader.map类似于map,但其参数返回结果的函数称为bind。其签名为: bind : ('a -> Result<'b, 'c>) -> Result<'a, 'c> -> Result<'b, 'c> 当然,当我看到它的时候,很明显!正是我想要的,谢谢! bind : ('a -> Result<

我有一个将函数映射到“阅读器结果”的函数,其中f是
'a->'b:
('a->'b)->读卡器->读卡器


let map f=Reader.map类似于
map
,但其参数返回
结果的函数称为
bind
。其签名为:

bind : ('a -> Result<'b, 'c>) -> Result<'a, 'c> -> Result<'b, 'c>

当然,当我看到它的时候,很明显!正是我想要的,谢谢!
bind : ('a -> Result<'b, 'c>) -> Result<'a, 'c> -> Result<'b, 'c>
yourFunction : ('a -> Result<'b, 'c>) -> Reader<Result<'a, 'c>> -> Reader<Result<'b, 'c>>
yourFunction f = Reader.map <| Result.bind f