Writing Less Code with Functions

Most data-declaration and configuration languages allow for a way to write less code, to DRY up your configuration. (That is, don’t repeat yourself. Refer to The Pragmatic Programmer [HT00].) Ludwig also does this, in the form of functions. Ludwig is, in fact, built on top of a functional language known as lambda calculus. Don’t let that term scare you. Defining functions in Ludwig is straightforward.

Defining Functions

As you likely know from your experiences with Python, JavaScript, and most programming languages, functions are a useful tool for encapsulating instructions for reuse across a program. Write a function once and use it as many times and in as many places as you’d like. Functions are the quintessential ...

Get Scalable Cloud Ops with Fugue now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.