mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
comments
This commit is contained in:
parent
cd04013e70
commit
1d0f546a53
@ -287,12 +287,14 @@ object Stream {
|
||||
() => { i += by; k(doubleToUnboxed(i),null) }
|
||||
}
|
||||
|
||||
/** intended to be called from Unison code */
|
||||
final def fromInt64(u: U): Stream[UnboxedType] =
|
||||
k => {
|
||||
var i = unboxedToLong(u) - 1
|
||||
() => { i += 1; k(longToUnboxed(i), UnboxedType.Int64) }
|
||||
}
|
||||
|
||||
/** intended to be called from Unison code */
|
||||
final def fromUInt64(u: U): Stream[UnboxedType] =
|
||||
k => {
|
||||
var i = unboxedToLong(u) - 1
|
||||
|
@ -19,11 +19,4 @@ ten-simple =
|
||||
sum = Stream.fold-left 0 (+) t
|
||||
sum * 10000 + p + q + r + s
|
||||
|
||||
-- ten-simpler =
|
||||
-- t = Stream.take 10 (Stream.map fib4 (Stream.from-uint64 0))
|
||||
-- sum = Stream.fold-left 0 (+) t
|
||||
-- sum + 1
|
||||
--
|
||||
-- sum4 a b c d = a + b + c + d
|
||||
|
||||
ten-simple
|
||||
|
Loading…
Reference in New Issue
Block a user