【发布时间】:2017-11-27 09:05:37
【问题描述】:
我有两个功能,我正在尝试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))
我做错了什么?
【问题讨论】:
标签: scala