Skip to content

Instantly share code, notes, and snippets.

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@d2a4u
d2a4u / BNO055 Java driver for Raspberry Pi
Last active January 25, 2018 10:01
BNO055 Java driver port for Raspberry Pi based on this repo: https://github.com/jcorcoran/BNO055_FRC/blob/master/src/org/team2168/utils/BNO055.java) but using pi4j library
import com.pi4j.io.i2c.I2CBus;
import com.pi4j.io.i2c.I2CDevice;
import com.pi4j.io.i2c.I2CFactory;
import java.io.IOException;
import java.util.TimerTask;
public class BNO055 {
//Tread variables
private java.util.Timer executor;