https://github.com/probmods/webppl-array-utils
https://github.com/probmods/webppl-array-utils
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/probmods/webppl-array-utils
- Owner: probmods
- Created: 2016-06-15T13:12:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-17T07:55:18.000Z (about 10 years ago)
- Last Synced: 2025-10-10T04:27:00.347Z (8 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webppl-array-utils
This package includes several array utility functions that were
removed from core WebPPL at version 0.8:
ringForward
ringBackward
mapPairs2
mapPairsC
mapPairsNC
mapReduce
mapReduce1
insertAt
removeAt
replaceAt
drop
take
dropWhile
takeWhile
## Installation
To globally install `webppl-array-util`, run:
mkdir -p ~/.webppl
npm install --prefix ~/.webppl webppl-array-util
## Usage
Once installed, you can make the functions in this package available
to `program.wppl` by running:
webppl program.wppl --require webppl-array-utils
## Tests
Run the tests with:
npm run test