Add tags

Add tags to the following comment
reverseMapを自前で。
1
2
3
4
5
6
def reverseMap[A](l:Seq[A],f:A=>unit):unit = l match {
  case Nil => ()
  case x::Nil => f(x)
  case x => f(x.last);reverseMap[A](l.slice(0, l.length-1),f)
}
reverseMap(List(1,2,3,4,5), println)

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...