From 325d49e8fdc8c6cdb302d67185777a85bfacd58a Mon Sep 17 00:00:00 2001 From: Attila Magyar Date: Sun, 20 Jun 2021 00:09:53 +0200 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index f326269..571363c 100644 --- a/README.md +++ b/README.md @@ -238,4 +238,28 @@ Lists are java.util.LinkedHashMap instances and garbage collected automatically 1 5 upto \ creates a list like [ 1 2 3 4 ] ``` +```forth +\ adds 5 to the end of the list +[ 1 2 3 4 ] dup 5 add +``` + + +```forth +\ prepends 0 to the beginning of the list +[ 1 2 3 4 ] dup 0 prep +``` + +```forth +[ 1 2 3 ] size \ gets the size of the list +``` + +```forth +[ 1 2 3 4 ] 2 at \ gets the second item of the list ( indexing is zero based ) +``` + +```forth +alist clear \ removes all items from the list +``` + + ## HTTP