腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(9999+)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
将
Either
<A,B>[]转换为
Either
<A[],B[]>
正如标题所述,我想将
Either
<A, B>[]转换为
Either
<A[], B[]>const compress = <A, B>(arr: E.
Either
<A, B>[]): E.
Either
<A[], B[]> => E.right([]), (acc: E.
Eit
浏览 5
修改于2022-08-24
得票数 1
回答已采纳
2
回答
ReaderWriterState[
Either
]短路
playerOrError <- userService.findPlayer(1L) //How to short-circuit if findPlayer returns left
either
浏览 3
提问于2017-07-20
得票数 1
回答已采纳
1
回答
Either
.right =对和
Either
.Left=Left吗?
在下一个地点: object EitherStyle { if (s.matches[0-9]+"))
Either
.right(s.toInt) else
Either
.left(new NumberFormatException(s"${s} is not a validdef reciprocal(i: Int):
Either
[Exception, Double] =
浏览 3
提问于2020-02-12
得票数 1
回答已采纳
1
回答
如何将
Either
.Right传输到
Either
.Left?
db.findUser(id).then(R.pipe( R.map(R.ifElse(secondTestHere, obj => obj, () =>
Either
.Left(err))),)) 如果第一个测试没有通过,它将返回
Either
.Left
浏览 3
修改于2017-05-23
得票数 0
回答已采纳
3
回答
Scala.
Either
orElse方法
在Scala中使用
Either
的惯用方法是什么?例如,在使用Option时,如果current是None,我可以使用orElse方法获得下一个可选值。但是如何以同样的方式处理
Either
呢?,我可以用Option替换它,但是如何在这里使用
Either
浏览 4
修改于2013-08-21
得票数 7
回答已采纳
1
回答
如何使用cats将` `NonEmptyList[
Either
[Error,User]]`转换为`
Either
[Error,NonEmptyList[User]]`?
我正在使用,想知道如何使用它来转换数据:至 val target:
Either
[Error, NonEmptyList
浏览 1
提问于2018-01-14
得票数 5
回答已采纳
1
回答
尝试实现Data.
Either
为了帮助我学习应用函数器和函数器,我认为看看
Either
是如何用类型类Functor和Applicative实现的会很有趣。
浏览 2
提问于2011-08-19
得票数 12
回答已采纳
1
回答
如何在多个
Either
<上绑定,>?
我有两个函数返回
Either
<Error,?>,第二个函数依赖于第一个函数。
Either
<Error, bool>
either
1 = ReturnEither1(...);现在,我有一个依赖于
either
1和
either
2的第三个函数,它的左边类型也是Error。
Either
<
浏览 3
提问于2020-05-06
得票数 0
回答已采纳
2
回答
将
Either
<E,A>的数组转换为
Either
<E,A[]> (Scalaz中的序列函数)
我有一个数组的
Either
<any, number>[],我想得到一个
Either
<any, number[]>。import { NumberFromString } from 'io-ts-types/lib/NumberFromString' const a:
Either
<any,number>[]
浏览 15
修改于2020-02-18
得票数 6
回答已采纳
1
回答
在fp中遍历/序列a Array<
Either
<E,A>>到
Either
<Array<E>,Array<A>>
具有默认应用程序的遍历/序列将产生
Either
<E, A[]> (仅是第一个遇到的错误),而不是需要的
Either
<E[], A[]>。
浏览 5
修改于2022-08-09
得票数 0
回答已采纳
1
回答
将Task[
Either
]和IO[
Either
]表示为包含tryCatch的单个monad?
有没有一种方法可以将IOEither和TaskEither表示为同时包含tryCatch的单个Monadinterface EngineRepository<M extends URIS2> {} const
浏览 11
提问于2020-12-03
得票数 0
2
回答
如何测试
Either
<Failure,List<Object>>
有人能让我知道当列表在
Either
<< Right >>中时如何测试结果吗?verify(mockBoardRemoteDataSource.getBoards()); //
Either
浏览 10
提问于2022-03-28
得票数 1
2
回答
在Firestore中使用
Either
<L、R>
我尝试在Firestore中使用这两种方法,我的函数是这个 //Here I want to add
Either
.Leftprivate val repo = SendProductRepo()
浏览 3
提问于2019-09-11
得票数 1
1
回答
Java CompletionStage to CompletionStage<
Either
>类型丢失
return CompletableFuture.runAsync(() -> { // Then
either
<ErrorResponse, Data>> return(e ->
Either
.left(Error
浏览 2
修改于2017-07-21
得票数 0
回答已采纳
1
回答
Scala.
Either
getOrElse方法
为什么我打字的时候一切都很好?但是当我输入这个编译失败了?编译错误: ( RightString,Int.left getOrElse RightString,In
浏览 4
提问于2013-08-21
得票数 7
1
回答
无法导入Control.Proxy.Trans.
Either
但我无法导入Control.Proxy.Trans.
Either
。这个模块位于哪个库中?
浏览 1
提问于2017-02-02
得票数 1
回答已采纳
1
回答
在c# LanguageExt中将
Either
<Error、Option<X>>转换为Option<
Either
<Error、X>>
解析函数返回
Either
<Error, Mydto>。如果dto与给定的规则匹配,或者它是一个错误,那么我希望返回结果,否则,什么也得不到。最后的结果应该是Option<
Either
<Error, Mydto>>类型。我最终得到了像这样的东西 MyDto.From("some json") // Returns
Either
S
浏览 16
提问于2020-03-05
得票数 0
回答已采纳
2
回答
优雅地处理Scala Future[
Either
]]
我有一种形状是这样的:我知道我可以在这上面进行模式匹配,然后进入右或左类型,但问题是我必须嵌套我的模式匹配逻辑
浏览 1
提问于2015-10-23
得票数 2
回答已采纳
2
回答
如何通过typelevel猫将`
Either
[Error,Option[ How [Error,Account]`转换为`
Either
[Error,Option[Account]]`?
从…至 val target:
Either
[Error, Option[Account
浏览 1
修改于2018-01-15
得票数 5
回答已采纳
1
回答
在哪里使用`ApplicativeError`而不是`
Either
`?
有ApplicativeError[F,E] + F[A],也有
Either
[E, A]。它们都传达了这样的信息:函数可能会因为E而失败,或者会因为A而成功,但我不确定它们向客户端传达的关于处理错误的预期方式的不同信息: def f1[F[_]: Applicative[F]]: F[
Either
浏览 4
修改于2020-04-28
得票数 4
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券