Download Introduction to Objective Caml by Jason Hickey PDF

By Jason Hickey

Show description

Read Online or Download Introduction to Objective Caml PDF

Similar programming: programming languages books

Webseitenlayout mit CSS

Keine Angst vor CSS! Auch in Zeiten von Joomla! und WordPress sorgen Cascading kind Sheets fur unverwechselbares Webseitendesign. Anhand von 23 Praxisbeispielen zeigt der erfahrene Webentwickler, Dozent und coach Clemens Gull, wie Sie CSS gezielt einsetzen und welche Designeffekte Sie damit erzielen konnen.

Web-Programmierung: Softwareentwicklung mit Internet-Technologien — Grundlagen, Auswahl, Einsatz — XHTML & HTML, CSS, XML, JavaScript, VBScript, PHP, ASP, Java

Endlich zuverlässiges Wissen zur Entwicklung von Internet-Anwendungen - alles in einem Buch. Das Buch eignet sich sowohl für den Einsatz in der Praxis wie auch als Lehrbuch. Orientierung für die Software-Entwicklung im net und Intranet kompakt und verständlich: Ab sofort müssen Sie das Wissen, das Sie benötigen, nicht mehr aus vielen Büchern zusammensuchen.

Additional info for Introduction to Objective Caml

Sample text

4. EXERCISES 4. let y = 2 in let f x = x + y in let f x = let y = 3 in f y in f 5 5. 3 Write a function sum that, given two integer bounds n and m and a function f, computes a summation. sum n m f = m i=n f (i). 4 Euclid’s algorithm computes the greatest common divisor (GCD) of two integers. It is one of the oldest known algorithms, appearing in Euclid’s Elements in roughly 300 BC. It can be defined in pseudo-code as follows, where ← represents assignment. gcd(n, m) = while m = 0 if n > m n←n−m else return m←m−n n Write an OCaml function %% that computes the GCD using Euclid’s algorithm (so n %% m is the GCD of the integers n and m).

TUPLES, LISTS, AND POLYMORPHISM For clarity, we listed the rev function here. rev. Copyright © Jason Hickey 46 Draft. Do not redistribute. CHAPTER 5. 5. 1 The comma , that is used to separate the elements of a tuple has one of the lowest precedences in the language. How many elements do the following tuples have, and what do the expressions evaluate to? 1. 1 + 2, 3, - 5 2. "ABC", ( 1 , "def" ), () 3. 2 What are the types of the following functions? 1. let f (x, y, z, w) = x + z 2. let f (x, y, z, w) = (w, z, y, x) 3.

Let y = 2 in let f x = x + y in let f x = let y = 3 in f y in f 5 5. 3 Write a function sum that, given two integer bounds n and m and a function f, computes a summation. sum n m f = m i=n f (i). 4 Euclid’s algorithm computes the greatest common divisor (GCD) of two integers. It is one of the oldest known algorithms, appearing in Euclid’s Elements in roughly 300 BC. It can be defined in pseudo-code as follows, where ← represents assignment. gcd(n, m) = while m = 0 if n > m n←n−m else return m←m−n n Write an OCaml function %% that computes the GCD using Euclid’s algorithm (so n %% m is the GCD of the integers n and m).

Download PDF sample

Rated 4.71 of 5 – based on 22 votes