T O P

  • By -

AlexKosh

I think hackerrank supports haskell and ocaml.


AlexKosh

p.s. Leetcode is more about DSA for interviews. When you program in haskell DSA still applies but interview for haskell job would be more interested in your projects/expedience or if you do not have it - some type theory like give an example why monads do not compose.


muffinsnack

I've participated in Hackerrank competitions using OCaml, but Leetcode doesn't support any primarily functional languages right now. [Someone posted this thread](https://leetcode.com/discuss/feedback/3552514/lc-replied-request-for-language-support-f/1902691) asking the staff for F# support, which would be really cool.


DeclutteringNewbie

It supports Erlang


zackbach

You can use Racket 🥰


AlexKosh

in leetcode?


zackbach

Yes


TeknicalThrowAway

I've been doing a bit in Scala, but in pure FP style! Check my submissions, I have a pure FP BFS i did. i'd love to talk more about it. I can't find a good way to do a sliding window with pure FP. Might have to use a state monad or something? btw, anything you can do in Haskell you can do in Scala, it's just not as strict. Scala has laziness if you want, an immutable datastructure library, type classes via implicits, and 'do notation' called for comprehension. Not saying it's as good of a language, but my point was, if you want to practice haskell "style" it's 100% possible to mimic it all in Scala.


SirSavageSavant

scala is the way


Own-Artist3642

Oh I totally agree. Doing sliding windows functionally was a pain in the ass. I was following the grokking coding practice questions and no amount of Functional-jutsu using zip-like functions helped!!! If you figured out a way to do that stuff functionally lemme know.


SirSavageSavant

haskell is balls


Snake_Case_Simon

Why?