cryptol/docs/ProgrammingCryptol/enigma/Finite.cry

14 lines
338 B
Plaintext
Raw Normal View History

2014-04-18 02:34:25 +04:00
/*
* Copyright (c) 2013-2016 Galois, Inc.
2014-04-18 02:34:25 +04:00
* Distributed under the terms of the BSD3 license (see LICENSE file)
*/
xs = [ 1 .. 100 ]
sumInf xs = iterSums
where
sums = [ 0 ] # [ x + y | x <- xs
| y <- sums ]
iterSums = [ x + y | x <- sums
| y <- [ 1 ...] ]