From c60d54d00992906467f004aad692e0bf3b370ed9 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Wed, 6 Jun 2018 11:32:19 -0700 Subject: [PATCH] Minor docs edits. --- .../_build/html/_modules/joy/library.html | 15 +++++++++++++-- docs/sphinx_docs/_build/html/library.html | 11 ++++++++++- joy/library.py | 15 +++++++++++++-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/docs/sphinx_docs/_build/html/_modules/joy/library.html b/docs/sphinx_docs/_build/html/_modules/joy/library.html index b0d5920..aa2024e 100644 --- a/docs/sphinx_docs/_build/html/_modules/joy/library.html +++ b/docs/sphinx_docs/_build/html/_modules/joy/library.html @@ -678,7 +678,14 @@
[docs]@inscribe @SimpleFunctionWrapper def concat(S): - '''Concatinate the two lists on the top of the stack.''' + '''Concatinate the two lists on the top of the stack. + :: + + [a b c] [d e f] concat + ---------------------------- + [a b c d e f] + +''' (tos, (second, stack)) = S for term in reversed(list(iter_stack(second))): tos = term, tos @@ -691,7 +698,11 @@ '''Like concat but reverses the top list into the second. :: - shunt == [swons] step + shunt == [swons] step == reverse swap concat + + [a b c] [d e f] shunt + --------------------------- + [f e d a b c] ''' (tos, (second, stack)) = stack diff --git a/docs/sphinx_docs/_build/html/library.html b/docs/sphinx_docs/_build/html/library.html index cc1198d..588a05c 100644 --- a/docs/sphinx_docs/_build/html/library.html +++ b/docs/sphinx_docs/_build/html/library.html @@ -217,6 +217,11 @@ one of the three depending on the results of comparing the two values:

joy.library.concat(stack, expression, dictionary)[source]

Concatinate the two lists on the top of the stack.

+
   [a b c] [d e f] concat
+----------------------------
+       [a b c d e f]
+
+
@@ -640,7 +645,11 @@ Boolean value (so empty string, zero, etc. are counted as false, etc.)

joy.library.shunt(stack, expression, dictionary)[source]

Like concat but reverses the top list into the second.

-
shunt == [swons] step
+
shunt == [swons] step == reverse swap concat
+
+   [a b c] [d e f] shunt
+---------------------------
+     [f e d a b c] 
 
diff --git a/joy/library.py b/joy/library.py index 3157dc8..081e982 100644 --- a/joy/library.py +++ b/joy/library.py @@ -645,7 +645,14 @@ def reverse(S): @inscribe @SimpleFunctionWrapper def concat(S): - '''Concatinate the two lists on the top of the stack.''' + '''Concatinate the two lists on the top of the stack. + :: + + [a b c] [d e f] concat + ---------------------------- + [a b c d e f] + +''' (tos, (second, stack)) = S for term in reversed(list(iter_stack(second))): tos = term, tos @@ -658,7 +665,11 @@ def shunt(stack): '''Like concat but reverses the top list into the second. :: - shunt == [swons] step + shunt == [swons] step == reverse swap concat + + [a b c] [d e f] shunt + --------------------------- + [f e d a b c] ''' (tos, (second, stack)) = stack