references/sleep-functions/INDEX.md

GitHub

Sleep Programming Language Documentation Index

This directory contains split documentation for the Sleep programming language, organized for efficient LLM ingestion.

Source: https://sleep.dashnine.org/manual/


Tutorial Documentation

Core Concepts

  • intro.md - Introduction to Sleep, support resources, and acknowledgements
  • started.md - Getting started with stand-alone scripts and the Sleep console
  • fundamentals.md - Scalars, scalar expressions, numbers, and strings
  • datastruct.md - Arrays, stacks, lists, sets, and hashes
  • flowcontrol.md - Comparisons, loops, exceptions, and assertions
  • functions.md - Subroutines, scalar scope, closures, and continuations
  • regex.md - Regular expression patterns and matching
  • hoes.md - Java object integration and object expressions
  • io.md - Input/Output handles, files, network, threads, and buffers
  • embed.md - Sleep integration, extending Sleep, and working with scalars

Reference Documentation

Arrays (30 functions)

Operations for manipulating array data structures.

  • add.md - Add elements to an array or hash
  • addAll.md - Add all elements from one array to another
  • cast.md - Cast an array to a specific Java array type
  • clear.md - Clear all elements from an array or hash
  • concat.md - Concatenate arrays
  • copy.md - Create a copy of an array or hash
  • filter.md - Filter array elements using a function
  • flatten.md - Flatten a nested array structure
  • identity.md - Test scalar identity (=~)
  • in.md - Test if element is in array or hash
  • map.md - Map a function over array elements
  • pop.md - Remove and return last element
  • push.md - Add element to end of array
  • putAll.md - Put all key-value pairs into a hash
  • reduce.md - Reduce array using a function
  • remove.md - Remove element from array or hash
  • removeAll.md - Remove multiple elements
  • removeAt.md - Remove element at specific index
  • retainAll.md - Retain only specified elements
  • reverse.md - Reverse array order
  • search.md - Search for element in array
  • shift.md - Remove and return first element
  • size.md - Get size of array or hash
  • sort.md - Sort array with custom comparator
  • sorta.md - Sort array alphabetically
  • sortd.md - Sort array as doubles
  • sortn.md - Sort array numerically
  • splice.md - Remove/replace elements in array
  • sublist.md - Get subarray slice
  • sum.md - Sum numeric array elements

Date/Time (3 functions)

Functions for working with dates and times.

File System (21 functions)

Operations for working with files and directories.

Hashes (6 functions)

Operations specific to hash/map data structures.

Input/Output (31 functions)

Functions for reading, writing, and managing I/O streams.

Math (28 functions)

Mathematical operations and functions.

Strings (29 functions)

String manipulation and pattern matching.

Utility (39 functions)

General utility and meta-programming functions.


Quick Reference

By Category

  • Arrays: 30 functions for array manipulation
  • Date/Time: 3 functions for date/time operations
  • File System: 21 functions for file operations
  • Hashes: 6 functions for hash/map operations
  • Input/Output: 31 functions for I/O operations
  • Math: 28 mathematical functions
  • Strings: 29 string manipulation functions
  • Utility: 39 utility and meta-programming functions

Total Functions: 187


Usage Notes

  • Each function page contains the full documentation from the Sleep manual
  • Function pages include examples, parameters, return values, and related functions
  • Tutorial pages provide comprehensive learning material
  • All content sourced from https://sleep.dashnine.org/manual/

License

Sleep is distributed under the LGPL (GNU Lesser General Public License). Documentation © Raphael Mudge