day5

package
v0.0.0-...-36687a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Car

func Car(pair PairFunc) interface{}

Car invokes the PairFunc to operate on the pair and return the first value in the pair.

func Cdr

func Cdr(pair PairFunc) interface{}

Cdr invokes the PairFunc to operate on the pair and return the second value in the pair.

Types

type PairFunc

type PairFunc func(PairOperator) interface{}

PairFunc is a function that takes a PairOperator function as an argument and returns a value.

func Cons

func Cons(a, b interface{}) PairFunc

Cons is given by the problem. Arguments a and b can be anything and returns a PairFunc.

type PairOperator

type PairOperator func(interface{}, interface{}) interface{}

PairOperator is a function that can operate on a pair and return a value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL