Skip to main content

Questions tagged [ocaml]

OCaml is a strict statically-typed functional programming language, focusing on expressivity, correctness and efficiency.

4 votes
1 answer
208 views

The objective was to create a weight-balanced binary search tree with a well-defined interface. Any critiques or suggestions for improvement are welcome. ...
Chris's user avatar
  • 5,582
2 votes
1 answer
79 views

I've created an OCaml function which generates an ASCII grid with a specified cell size and number of cells per row. A grid with a cell size of 2 (chars) and a number of 3 cells per row looks as ...
pixus nixus's user avatar
2 votes
1 answer
94 views

I have this OCaml problem: Recall the polymorphic type lazy seen in class, the function delay which transforms a ...
V_head's user avatar
  • 575
3 votes
1 answer
884 views

I'm very new to OCaml, and as an exercise I decided to implement the nth Fibonacci algorithm (return a specific Fibonacci number, given an index) in different ways, using what I've learned so far. I ...
NPN328's user avatar
  • 791
1 vote
0 answers
203 views

LeetCode Problems 3. Longest substring without repeating characters Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", ...
madeinQuant's user avatar
3 votes
1 answer
306 views

I wrote an OCaml program that displays a scrolling marquee in the terminal: Code: ...
Flux's user avatar
  • 403
1 vote
1 answer
1k views

I want to create a backend for a simple REST API in OCaml. For this I use the libs httpaf and yojson. I have something that works but I would like some reviews. Here is the structure of my little ...
cedlemo's user avatar
  • 173
2 votes
2 answers
176 views

I just started Advent of Code 2018. This is exercise 2 of day 1, and I can't understand why my code is so slow (4 minutes 37 seconds, compared to 200ms for a friend who did it in Clojure with the same ...
laurentmeyer's user avatar

15 30 50 per page