- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

The online hangout for Göteborg Functional Programming Group and everybody interested.

I found this with the overloading: https://deque.blog/2017/06/14/10-things-idris-improved-over-haskell/

The real problem of why Set is not a monad in Haskell is that it requires Ord. Mathematically there's no issue.

last time I wrote idris a bit "seriously" was like 2 years go, I'm starting to forget some stuff :p I should get back to it maybe this year :D

so the Set

`do`

would kind of behave like a List monad @jolod ?
I can try to do that later today

(So

`x <- Array.fromFoldable xs`

.)
there you go @jolod :

```
module SetMonad
import Data.SortedSet
(>>=) : (Ord a, Ord b) => SortedSet a -> (a -> SortedSet b) -> SortedSet b
(>>=) xs fn = foldr (\elem, accu => union (fn elem) accu) empty xs
pure : Ord a => a -> SortedSet a
pure a = fromList [a]
shenaningans : SortedSet Int
shenaningans = do
a <- fromList [1,2,3]
b <- fromList [1,2,3]
pure (a * b)
result : List Int
result = Data.SortedSet.toList shenaningans
```

(kind of need to force evaluation on the result with :x at the repl though, my understanding is that

`do`

has lazy semantics)
Random question, but does anyone know where the style of very abbreviated function/variable names come from? It seems to be very common in C. I think maybe some old language had a restriction on having one-letter names for things like loop variables or something like that, but C does not have such restriction.

Unique in first 8 characters is a rather strict requirement on length.

That explains so much!

(also, sorry for creating a language that mixes C-style curly brackets and S-expressions :P)

That and Nix.

this was an interesting read: https://blog.sigplan.org/2019/12/30/defunctionalization-everybody-does-it-nobody-talks-about-it/

interesting

anyone else reading this today? https://lexi-lambda.github.io/blog/2020/01/19/no-dynamic-type-systems-are-not-inherently-more-open/

@eriksvedang idk, I think any treatment of dynamic vs static is bound to be a failure, since it's comparing one orange to a whole garden of different apple trees. The critique from the dynamic camp is usually implicitly qualified with "[static typing] in a language that I can actually use to solve my problem", and proponents reply (as this blog does) with "sure, language X has some flaws, but look at these 10 different languages that all have one aspect of what you want".

Sorry, the blog only listed 6 languages.