phunkie

Installation

Requirements

Phunkie requires:

Installation via Composer

You can install Phunkie using Composer:

composer require phunkie/phunkie

This will add Phunkie as a dependency to your project and install it in your vendor directory.

Phunkie Console

Phunkie comes with an interactive console that allows you to experiment with functional programming concepts.

composer require --dev phunkie/phunkie-console

After installation, you can find the console executable at:

vendor/bin/phunkie-console

For convenience, you may want to create a symlink:

$ mkdir bin
$ ln -s vendor/bin/phunkie-console $PWD/bin/phunkie

Using the Console

To start the console, simply run:

$ bin/phunkie-console
Welcome to phunkie console.

Type in expressions to have them evaluated.

phunkie >

The console provides an interactive REPL (Read-Eval-Print Loop) where you can:

Some useful console commands:

Example console session:

Welcome to Phunkie console
Type in expressions to have them evaluated.

phunkie> Some(42)
$var0: Option<Int> = Some(42)

phunkie> :type Some(42)
Option<Int>

phunkie> None()
$var1: None

phunkie> ImmList(1,2,3)
$var2: List<Int> = List(1,2,3)