Tutorial

Supplemental Guide 3 - Learn Programming with Daml

19 steps

In Tutorial 2, we covered the Canton Network's "network of networks" topology, explaining participant nodes and synchronizers. It details the multi-party transaction lifecycle from command submission to atomic commit, and outlines workflow design principles for Daml contracts. The tutorial also provides setup instructions for the development environment on Ubuntu and macOS, including Node.js and the Daml SDK.

In this tutorial, we cover functional programming with Daml—exploring its syntax, and apply functional concepts to your smart contract code and business logic, gaining valuable skills applicable to both blockchain and general software development.

Helpful prior knowledge

Completion of "Supplemental Guide 2 - Developer Concepts and Essentials" is required. It is also highly recommended to have prior programming and blockchain knowledge for this tutorial as this is a highly involved topic.


Learning Outcomes

You will be able to:

  • Write clean and composable Daml code by building complex logic from simple, reusable functions.
  • Understand and use higher-order functions like map and filter to process data effectively.
  • Learn about immutability and recursion as well as data types in Daml.

Tutorial Steps

Total steps: 19

  • Step 1: What is Functional Programming?
  • Step 2: VSCode and Daml VSCode Extension
  • Step 3: Variables
  • Step 4: Strong Typing in Daml
  • Step 5: Primitive Data Types: Numbers
  • Step 6: Primitive Data Types: Text and Booleans
  • Step 7: Primitive Data Types: Date and Time
  • Step 8: Essential Functions for Scripting and Debugging
  • Step 9: Functions
  • Step 10: Collections and Data Structures: Lists
  • Step 11: Collections and Data Structures: Tuples
  • Step 12: Collections and Data Structures: Sets and Maps
  • Step 13: More About Functions in Daml
  • Step 14: Conditional Control Flows
  • Step 15: Recursion, Maps and Folds
  • Step 16: Records
  • Step 17: Type Classes
  • Step 18: Option, Either and More About Type Classes
  • Step 19: Stacking It Up!

Help Center Support?

Find articles to support you through your journey or chat with our support team.

Help Center