Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* add std/scripting

* thanks for juancarlospaco's suggestion

* Update src/fusion/scripting.nim

Co-authored-by: ee7 <[email protected]>

* Update changelog.md

Co-authored-by: ee7 <[email protected]>

* remove

Co-authored-by: ee7 <[email protected]>
  • Loading branch information
ringabout and ee7 authored Apr 25, 2021
1 parent 1e6f2f5 commit 31be851
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/fusion/btreetables.nim
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ proc `==`*[A, B](a, b: Table[A, B]): bool =
# -------------------------------------------------------------------


proc newTable*[A, B](): <//>TableRef[A, B] =
proc newTable*[A, B](): TableRef[A, B] =
## Creates a new ref table that is empty.
##
## ``initialSize`` must be a power of two (default: 64).
Expand All @@ -869,7 +869,7 @@ proc newTable*[A, B](): <//>TableRef[A, B] =
new(result)
result[] = initTable[A, B]()

proc newTable*[A, B](pairs: openArray[(A, B)]): <//>TableRef[A, B] =
proc newTable*[A, B](pairs: openArray[(A, B)]): TableRef[A, B] =
## Creates a new ref table that contains the given ``pairs``.
##
## ``pairs`` is a container consisting of ``(key, value)`` tuples.
Expand All @@ -885,7 +885,7 @@ proc newTable*[A, B](pairs: openArray[(A, B)]): <//>TableRef[A, B] =
new(result)
result[] = toTable[A, B](pairs)

proc newTableFrom*[A, B, C](collection: A, index: proc(x: B): C): <//>TableRef[C, B] =
proc newTableFrom*[A, B, C](collection: A, index: proc(x: B): C): TableRef[C, B] =
## Index the collection with the proc provided.
# TODO: As soon as supported, change collection: A to collection: A[B]
result = newTable[C, B]()
Expand Down Expand Up @@ -1798,7 +1798,7 @@ iterator mvalues*[A, B](t: var OrderedTable[A, B]): var B =
# ---------------------------------------------------------------------------


proc newOrderedTable*[A, B](initialSize = 64): <//>OrderedTableRef[A, B] =
proc newOrderedTable*[A, B](initialSize = 64): OrderedTableRef[A, B] =
## Creates a new ordered ref table that is empty.
##
## See also:
Expand All @@ -1813,7 +1813,7 @@ proc newOrderedTable*[A, B](initialSize = 64): <//>OrderedTableRef[A, B] =
new(result)
result[] = initOrderedTable[A, B]()

proc newOrderedTable*[A, B](pairs: openArray[(A, B)]): <//>OrderedTableRef[A, B] =
proc newOrderedTable*[A, B](pairs: openArray[(A, B)]): OrderedTableRef[A, B] =
## Creates a new ordered ref table that contains the given ``pairs``.
##
## ``pairs`` is a container consisting of ``(key, value)`` tuples.
Expand Down Expand Up @@ -2510,7 +2510,7 @@ iterator mvalues*[A](t: var CountTable[A]): var int =

proc inc*[A](t: CountTableRef[A], key: A, val = 1)

proc newCountTable*[A](initialSize = 64): <//>CountTableRef[A] =
proc newCountTable*[A](initialSize = 64): CountTableRef[A] =
## Creates a new ref count table that is empty.
##
## See also:
Expand All @@ -2521,7 +2521,7 @@ proc newCountTable*[A](initialSize = 64): <//>CountTableRef[A] =
new(result)
result[] = initCountTable[A]()

proc newCountTable*[A](keys: openArray[A]): <//>CountTableRef[A] =
proc newCountTable*[A](keys: openArray[A]): CountTableRef[A] =
## Creates a new ref count table with every member of a container ``keys``
## having a count of how many times it occurs in that container.
result = newCountTable[A]()
Expand Down

0 comments on commit 31be851

Please sign in to comment.