def idiot[T](func: List[T => T], rt: List[T]): List[T] = rt.map(func.reduce(_ andThen _))
assert(idiot[Int](List(identity, x => x >> 1, x => x >> 1), List(20)) == List(5))
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme