Compilers

OCaml Transition Guide

This document is a transition guide for students in the Swarthmore CS curriculum. It contains examples of code written in Python, C++, and OCaml.

Variable Declaration

String Concatenation

Standard User Interaction

Function Declaration

Recursive Functions

Loops

Using Libraries

String Formatting and Printing

Exceptions

Tuples

Absent Values

Polymorphic Dictionaries