http://deni-ok.livejournal.com/ ([identity profile] deni-ok.livejournal.com) wrote in [personal profile] deniok 2008-02-12 07:26 am (UTC)

Ага, понял
s' id = flip const

Но это не универсально. s' из-за const в своём определении затирает часть информации безвозвратно:
Prelude> :t (s' map)
(s' map) :: [b] -> a -> [a]

Применим к массиву символов и числу
Prelude> (s' map) "abcd" 1
[1,1,1,1]

Опс - символы пропали. С map, к тому же, конструкцию (s' map) s не сделать. Вобщем, о том и речь - неуниверсально это...

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting