{"size": 1219, "ext": "scrbl", "max_stars_repo_path": "book/building-blocks.scrbl", "max_stars_repo_name": "tacit-lang/tacit-gen1-scheme", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "book/building-blocks.scrbl", "max_issues_repo_name": "tacit-lang/tacit-gen1-scheme", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "book/building-blocks.scrbl", "max_forks_repo_name": "tacit-lang/tacit-gen1-scheme", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.9361702128, "max_line_length": 255, "alphanum_fraction": 0.7432321575}
#lang scribble/base
@(require "utils.rkt")

@title{Building blocks}

@section{Expressions}

The most basic expressions are single values. Here are a couple examples of integers and strings.

@code|{5}|
@result{5}

@code|{"hello"}|
@result{"hello"}

Tacit uses a ``stack'' for expressions.

@code|{5 "hello"}|
@result{5 "hello"}

@code|{5 2 *}|
@result{10}

@code|{"hello" "-world" cat}|
@result{"hello-world"}

@ergonomics{As long as you keep your expressions short (and meaningful) with variables and functions, you'll find that Reverse Polish Notation is a very comfortable form of writing. No order of operations to memorize and no nested parenteses to navigate.}

@section{Assignment}

To store the result of an expression, you can assign it to a variable.

@code|{greeting = "hello"}|

@ergonomics{Notice there are no type delcarations or ``new variable'' notation? All variable assignment is written the same way.}

@determinism{If you ``re-assign'' a varible, it creates a new lexical binding. Any previous references will refer to the previous lexical binding (of the same name) with previous variable contents.}

@section{Experiment: ?}

@section{Definitions}
@section{Conditionals}


@section{Experiment: ?}

