[personal profile] sassa_nf
Prelude> let it f xs = ys where (ys, fs) = unzip $ zipWith ($) (f:fs) xs

<interactive>:3:35:
    Occurs check: cannot construct the infinite type:
      b0 = b1 -> (a0, b0)


Рекурсию решить может, а вот такое - нет. Как дальше жить? :)

Date: 2013-06-03 05:47 pm (UTC)
From: [identity profile] sassa-nf.livejournal.com
а это я по мотивам поста про Iteratee. По сути Iteratee в изложении rssh генерируют вот такую вот цепочку fs для xs. Я попытался использовать трюк, выражающий unfoldr через zipWith, но вот с выводом типа получилась беда.

Profile

sassa_nf

February 2026

S M T W T F S
1234567
891011121314
15161718192021
222324252627 28

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 23rd, 2026 02:46 am
Powered by Dreamwidth Studios