=pod

=encoding utf8

=head1 NAME

YAMLScript::FFI - Program in YAML

=head1 SYNOPSIS

A YAMLScript program C<99-bottles.ys>:

    #!/usr/bin/env yamlscript

    defn main(number=99):
      map(say):
        map(paragraph):
          (number .. 1)

    defn paragraph(num): |
      $(bottles num) of beer on the wall,
      $(bottles num) of beer.
      Take one down, pass it around.
      $(bottles (num - 1)) of beer on the wall.

    defn bottles(n):
      ???:
        (n == 0) : "No more bottles"
        (n == 1) : "1 bottle"
        :else    : "$n bottles"

Run: C<yamlscript 99-bottles.ys 3>

    3 bottles of beer on the wall,
    3 bottles of beer.
    Take one down, pass it around.
    2 bottles of beer on the wall.

    2 bottles of beer on the wall,
    2 bottles of beer.
    Take one down, pass it around.
    1 bottle of beer on the wall.

    1 bottle of beer on the wall,
    1 bottle of beer.
    Take one down, pass it around.
    No more bottles of beer on the wall.

Use the YAMLScript REPL:

    $ yamlscript
    Welcome to YAMLScript [perl]

    user=> nums =: (1 .. 3)
    user/nums
    user=> nums
    (1 2 3)
    user=> map(inc nums)
    (2 3 4)
    user=> <CTL-D>         # to exit
    $

=head1 STATUS

This is ALPHA software. Expect things to change.

=head1 DESCRIPTION

B<YAMLScript> is a programming language that uses YAML as a base syntax.

See L<https://yamlscript.org|https://yamlscript.org> for more info.

Proper docs coming soon.

=head1 SEE ALSO

=over

=item * L<YAMLScript Site|https://yamlscript.org>

=item * L<YAML|https://yaml.org>

=item * L<Clojure|https://clojure.org>

=back

=head1 AUTHORS

=over

=item * Ingy döt Net L<ingy@ingy.net|mailto:ingy@ingy.net>

=item * José Joaquín Atria L<jjattria@cpan.org|mailto:jjattria@cpan.org>

=back

=head1 COPYRIGHT AND LICENSE

Copyright 2022-2023 by Ingy döt Net

This is free software, licensed under:

The MIT (X11) License

=cut
