a NonEmptyList :)
-
-
-
Yeah, that’s what
@Bizmonger was using as a name for it when he was showing me some code with that type. -
It’s a nice idea. It would share many of the same operations as lists but with slightly different semantics in some cases.
-
Yes! But most importantly, safety! I can always call .head on a NEL. In Scala, I've seen it used mostly for validation (you get either a result or a NEL of validation errors)
-
What does NEL stand for?
-
NonEmptyList

-
Duh. Groan.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
Bucknard's Everfull PurseList
-
You're going all anamorphism there.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
Haskell calls it NonEmpty http://hackage.haskell.org/package/base/docs/Data-List-NonEmpty.html … In a past post, I've (accidentally?) called it NotEmptyCollection http://blog.ploeh.dk/2017/12/11/semigroups-accumulate …
-
I think it would be so cool to call it a ‘naturalist.’
- কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
What about the word Some? Some<People>. Some<Cars>.
-
I was happily surprised about the notEmpty semantic "some" brings. But now I wonder if we're losing the order semantic. It feels like "some" works more as a set than a list. What do you guys think?
-
Yes. `Some` does seem to imply a set instead of a list. It usual natural language more. In daily life, order is very often unimportant.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
The Free Semigroup 8^)
-
I was wondering whether there was an algebraic name.
-
type Free cls a = forall x. cls x => (a -> x) -> x type NonEmpty a = Free Semigroup a
-
Think of (a -> x) as creating a-variables, injecting a's into a mysterious x-goo \var -> var 1 <> var 2 <> var 3 The only thing we can do to x is (<>) it, corresponds to 1 :| [2, 3] :: NonEmpty Int
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
লোড হতে বেশ কিছুক্ষণ সময় নিচ্ছে।
টুইটার তার ক্ষমতার বাইরে চলে গেছে বা কোনো সাময়িক সমস্যার সম্মুখীন হয়েছে আবার চেষ্টা করুন বা আরও তথ্যের জন্য টুইটারের স্থিতি দেখুন।