我有两个功能,我正在尝试compose
它:
private def convert(value: String)
: Path = decode[Path](value) match {
private def verify(parsed: Path)
: Path = parsed.os match {
我尝试过如下:
verify compose convert _
编译器抱怨:
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing `verify _` or `verify(_)` instead of `verify`.
[error] verify compose convert _
[error] ^
[error] one error found
我正在努力完成以下任务:
def process(value: String)
: Path =
verify(convert(value))
我做错了什么?