Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

README.md

Marco

Language Reference

Literals

Numbers

All numbers of either positive or negative integers with no bounds.

1
-2
422319487132984710238740192387408937018470329874123123

Strings

Strings are delimited by double quotes.

"this is a string!"

Symbols

Symbols start with a :.

:a_symbol

Bindings

def bindings are immutable. var bindings are mutable and can be changed with set!.

(def :answer 42) // immutable binding

(var :done false) // mutable binding
(set! :done true) // mutation

Functions

All functions are anonymous. To create a function use the function function. To reuse a function, bind it with a def binding.

function takes a list of symbols and a block and returns an object that when called will evaluate the block adding the arguments to the block closure.

(def :inc @"Increments a number"
  (function [:n] {
    (+ n 1)
  })
)

To call a function use parenthesis.

(inc 2)

About

The Marco Programming Language

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.