Tidying up core (#256)

* remove _ prefixes except for functions to be patternified
* categorise pattern methods
* experimental support for `.add.squeeze` and friends as alternative to `.addSqueeze`
* `every` is now an alias for `firstOf` with additional `lastOf` (which every will become an alias for next)
This commit is contained in:
Alex McLean 2022-11-22 08:51:25 +00:00 committed by GitHub
parent 4cf412b93d
commit e1a532500e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 738 additions and 603 deletions

View file

@ -13,7 +13,7 @@ const { fastcat, evalScope } = strudel;
describe('evaluate', async () => {
await evalScope({ mini }, strudel);
const ev = async (code) => (await evaluate(code)).pattern._firstCycleValues;
const ev = async (code) => (await evaluate(code)).pattern.firstCycleValues;
it('Should evaluate strudel functions', async () => {
expect(await ev('pure("c3")')).toEqual(['c3']);
expect(await ev('cat("c3")')).toEqual(['c3']);