Cristian Prieto

IDisposable Thoughts

Honey, where's my coding t-shirt?

Gradle, Kotlin and ANTLR4

I remember read and learning ANTLR4 with the excelent book The definitive ANTLR4 reference by Terence Parr, it is a good book, I highly recommend it. Well, I recently wanted to read the book again and decided to do the examples with Gradle and Kotlin and while searching in the …

13 September 2018 on programming, compilers, kotlin 3 minutes reading

OCaml and sequences from scratch, part 3

Now it is the turn for three favourites in the Caml standard List module, map, fold_right, fold_left.

Let’s start with the non-tail recursive version of map (the List module version is not tail recursive neither), the idea is to return a list 'b which is the result …

13 February 2018 on ocaml, sequences, samples, learning, functional programming, algorithms 4 minutes reading

OCaml and sequences from scratch, comment of part 2

My good friend Daniel Chambers (@danielchmbrs) pointed out an error in my code for seq_append, and he was totally right! so I fixed it thanks to him, go and check it out, thanks buddy :)

Now, he mentioned something very important:

You should try to not make your functions partial …

11 February 2018 on ocaml, sequences, samples, learning, functional programming 2 minutes reading

OCaml and sequences from scratch, part 2

This is the second part of my series about simple sequences in OCaml from scratch, the first part is here.

We are going to explore a few more complex but not difficult list (or our own definition, seq) functions, they will be our building blocks for (hopefully) future blog posts …

08 February 2018 on ocaml, sequences, samples, learning, functional programming, algorithms 4 minutes reading

OCaml and sequences from scratch, part 1

I really like ML languages (OCaml, Elm, F#). Recently I was doing the problems in 99 problems in OCaml and found my lack of understanding in some basic patterns with lists.

I decided to reimplement some basic functions and structures in OCaml from scratch as an exercise. I usually do …

07 February 2018 on ocaml, sequences, samples, learning, functional programming, algorithms 5 minutes reading
  • Newer posts
  • Older posts

Powered by Pelican | Cristian Prieto © 2020