diff --git a/LICENSE.txt b/LICENSE.txt
index 0de86ad..c714d55 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019 William Quelho Ferreira
+Copyright (c) 2021 William Quelho Ferreira
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/config.ld b/config.ld
index a4927ee..c16d496 100644
--- a/config.ld
+++ b/config.ld
@@ -2,4 +2,4 @@ project = "functional"
file = "functional.lua"
dir = "docs"
title = "functional documentation"
-description = "Functional programming utilities written in pure lua"
+description = "Functional programming utilities written in pure Lua"
diff --git a/docs/index.html b/docs/index.html
index 1d09684..00eb587 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -30,7 +30,6 @@
functional
Contents
@@ -80,7 +79,7 @@ Iterable
Info:
- Copyright: 2021
- - Release: 1.2.0
+ - Release: 1.3.0
- License: MIT
- Author: William Quelho Ferreira
@@ -93,7 +92,7 @@
Create an Iterator for the iterable . |
- exports.counter (...) |
+ exports.counter () |
Iterate over the naturals starting at 1. |
@@ -179,20 +178,21 @@
functions into global scope.
-
+
-
-
Iterator.create (iterable) |
Iterate over the given iterable . |
+ Iterator:next () |
+ Retrieve the next element from the iterator. |
+
+
Iterator.counter () |
Iterate over the naturals starting at 1. |
@@ -205,8 +205,12 @@
Iterate over the coroutine 's yielded values. |
- Iterator.from_iterated_call (func) |
- Iterate over the function's returned values upon repeated calls |
+ Iterator.from (func, is, var) |
+ Iterate over the function's returned values upon repeated calls. |
+
+
+ Iterator.packed_from (func, is, var) |
+ Iterate over the function's returned values (packed into a table) upon repeated calls. |
Iterator.clone (iterable) |
@@ -320,18 +324,12 @@ Returns:
- exports.counter (...)
+ exports.counter ()
Iterate over the naturals starting at 1.
- Parameters:
-
Returns:
@@ -1060,12 +1058,12 @@ Returns:
-
+
-
-
- _VERSION
+
+ Iterator._VERSION
-
Module version.
@@ -1077,10 +1075,6 @@
-
-
-
-
-
Iterator.create (iterable)
@@ -1110,6 +1104,25 @@
Returns:
+
+ -
+
+ Iterator:next ()
+
+ -
+ Retrieve the next element from the iterator.
+
+
+
+
Returns:
+
+
+ the next value in the sequence
+
+
+
+
+
-
@@ -1206,11 +1219,13 @@
Returns:
-
-
- Iterator.from_iterated_call (func)
+
+ Iterator.from (func, is, var)
-
- Iterate over the function's returned values upon repeated calls
+ Iterate over the function's returned values upon repeated calls.
+ This can effectively convert a vanilla-Lua iterator into a functional-style
+ one (e.g.,
Iterator.from(io.lines "my_file.txt")
gives you a string iterator).
Parameters:
@@ -1219,6 +1234,12 @@ Parameters:
function
the function to call
+ - is
+ invariant state passed to func
+
+ - var
+ initial variable passed to func
+
Returns:
@@ -1231,6 +1252,42 @@ Returns:
+
+ -
+
+ Iterator.packed_from (func, is, var)
+
+ -
+ Iterate over the function's returned values (packed into a table) upon repeated calls.
+ This is similar to Iterator.from, but instead of the created Iterator
+ generating multiple return values per call, it returns them all
+ packed into an array.
+
+
+
Parameters:
+
+ - func
+ function
+ the function to call
+
+ - is
+ invariant state passed to func
+
+ - var
+ initial variable passed to fund
+
+
+
+ Returns:
+
+
+ iterator
+ the new Iterator
+
+
+
+
+
-
@@ -1737,7 +1794,7 @@
Returns:
generated by LDoc 1.4.6
-
Last updated 2021-09-05 23:41:35
+
Last updated 2021-09-09 18:35:44