I hereby claim:
- I am matt-martin on github.
- I am mattbmartin (https://keybase.io/mattbmartin) on keybase.
- I have a public key ASAO3e7-fSFUvUVgVopHxOALRXdcjhxAbUPEV6rvlBlNEQo
To claim this, I am signing this object:
// based on https://github.com/matt-martin/fpinscala/blob/05cd5a2b288677ebc67d258fcfb9c06b63052314/exercises/src/main/scala/fpinscala/datastructures/List.scala#L11 | |
def sumNonTailRecursive(ints: List[Int]): Int = ints match { | |
case Nil => 0 | |
case x :: xs => x + sumNonTailRecursive(xs) | |
} | |
@annotation.tailrec | |
def sumTailRecursiveHelper(ints: List[Int], sumSoFar: Int): Int = ints match { | |
case Nil => sumSoFar | |
case x :: xs => sumTailRecursiveHelper(xs, sumSoFar + x) |
I hereby claim:
To claim this, I am signing this object:
implicit def hNilToList[L <: HNil](l : L) : List[Any] = Nil | |
implicit def hListToList[H <: Any, T <: HList](l : H :: T)(implicit conv : T => List[Any]) : List[Any] = { | |
l.head :: conv(l.tail) | |
} | |
hListToList("foo" :: HNil) | |
//res23: List[Any] = List(foo) | |
hListToList("foo" :: "bar" :: HNil) |
import shapeless._ | |
import shapeless.ops.hlist._ | |
import shapeless.ops.nat._ | |
import cascading.tuple.{Tuple, TupleEntry} | |
import com.twitter.scalding._ | |
// documentation for cascading: | |
// http://docs.cascading.org/cascading/2.5/javadoc/cascading/tuple/TupleEntry.html |
cascading version: 3.0.0, build: wip-57 | |
application id: 843F17CE3594477D8C5E536EA2FC4CDE | |
application name: | |
application version: | |
platform: local:3.0.0-wip-57:Concurrent, Inc. | |
frameworks: | |
duration 2.114 | |
PreBalanceAssembly 0.553 |