lomeo: (лямбда)
[personal profile] lomeo
сейчас выяснил, что Хаскель, оказывается позволяет вот такой синтаксис:

data Foo a = (:/:) { first :: a, second :: a }

т.е. можно
> let x = 1 :/: 2
> x
(:/:) {first = 1, second = 2}
> first x
1

значит, в Prelude можно было бы написать и

data [a] = [] | (:) { head :: a, tail :: [a] }

забавно.
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

Profile

lomeo: (Default)
Dmitry Antonyuk

September 2025

S M T W T F S
 123456
78910111213
14 151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 27th, 2026 06:54 am
Powered by Dreamwidth Studios