Andrew Tropin on Nostr: npub18g4k0…2n4gd Something like this: (use-modules (ice-9 match) (srfi srfi-1)) ...
npub18g4k0gljynatgs2anultm3y55tmd2qjxra8wgywe8nqr3cr26g4qe2n4gd (npub18g4…n4gd) Something like this:
(use-modules (ice-9 match)
(srfi srfi-1))
(match-let (((sum prod)
(fold-right
(match-lambda* ((e (s p))
(list (cons (+ 2 e) s)
(cons (* 2 e) p))))
'(() ())
(iota 10))))
prod)
(use-modules (ice-9 match)
(srfi srfi-1))
(match-let (((sum prod)
(fold-right
(match-lambda* ((e (s p))
(list (cons (+ 2 e) s)
(cons (* 2 e) p))))
'(() ())
(iota 10))))
prod)