From 7343aff563e71c0b0fa25704df0ce0c70aea37f3 Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Sun, 25 Jan 2015 21:40:06 -0800 Subject: [PATCH] Maps! --- core/bool.html | 1 + core/class.html | 1 + core/fiber.html | 1 + core/fn.html | 8 ++++ core/index.html | 21 +++++++++- core/list.html | 33 ++++++++++++++-- core/map.html | 94 ++++++++++++++++++++++++++++++++++++++++++++ core/null.html | 1 + core/num.html | 1 + core/object.html | 1 + core/range.html | 1 + core/sequence.html | 7 ++++ core/string.html | 1 + functions.html | 4 +- getting-started.html | 11 ++---- maps.html | 93 ++++++++++++++++++++++++++++++++++++++++++- values.html | 16 ++++---- variables.html | 3 ++ 18 files changed, 275 insertions(+), 23 deletions(-) create mode 100644 core/map.html diff --git a/core/bool.html b/core/bool.html index 3e3c399f..e55e43a3 100644 --- a/core/bool.html +++ b/core/bool.html @@ -31,6 +31,7 @@
  • Fiber
  • Fn
  • List
  • +
  • Map
  • Null
  • Num
  • Object
  • diff --git a/core/class.html b/core/class.html index 9c5db38b..d65c2b08 100644 --- a/core/class.html +++ b/core/class.html @@ -31,6 +31,7 @@
  • Fiber
  • Fn
  • List
  • +
  • Map
  • Null
  • Num
  • Object
  • diff --git a/core/fiber.html b/core/fiber.html index 085c0dbb..c4ffb310 100644 --- a/core/fiber.html +++ b/core/fiber.html @@ -31,6 +31,7 @@
  • Fiber
  • Fn
  • List
  • +
  • Map
  • Null
  • Num
  • Object
  • diff --git a/core/fn.html b/core/fn.html index ddb46a3e..21bfaf65 100644 --- a/core/fn.html +++ b/core/fn.html @@ -31,6 +31,7 @@
  • Fiber
  • Fn
  • List
  • +
  • Map
  • Null
  • Num
  • Object
  • @@ -56,6 +57,13 @@ you create a "bare" function when you don't want to immediately pass it as a

    It is a runtime error if block is not a function.

    +

    arity #

    +

    The number of arguments the function requires.

    +
    IO.print(new Fn {}.arity)             // 0.
    +IO.print(new Fn {|a, b, c| a }.arity) // 3.
    +
    + +

    call(args...) #

    TODO

    diff --git a/core/index.html b/core/index.html index 49f26ec9..bec6ffbf 100644 --- a/core/index.html +++ b/core/index.html @@ -31,6 +31,7 @@
  • Fiber
  • Fn
  • List
  • +
  • Map
  • Null
  • Num
  • Object
  • @@ -42,7 +43,25 @@

    Core Library

    -

    TODO

    +

    Because Wren is designed for embedding in applications, its core +library is minimal and is focused on working with objects within Wren. For +stuff like file IO, graphics, etc., it is up to the host application to provide +interfaces for this.

    +

    All Wren source files automatically have access to the following classes:

    +