Get the latest tech news

Lucy: A concise language for describing Finite State Machines


{ toggle => disabled } initial state disabled { toggle => enabled } import { createMachine } from 'xstate'; export default function() { return createMachine({ initial: 'disabled', states: { enabled: { on: { toggle: 'disabled' } }, disabled: { on: { toggle: 'enabled' } } } }); } See the install page for detailed instructions on the various ways you can use Lucy, such as with popular JavaScript build tools. To use the command-line compiler install with: curl -sSf https://lucylang.org/install.sh |.

import{ createMachine }from'xstate';exportdefaultfunction(){returncreateMachine({ initial:'disabled', states:{ enabled:{ on:{ toggle:'disabled'}}, disabled:{ on:{ toggle:'enabled'}}}});}

Get the Android app

Or read this on Hacker News

Read more on:

Photo of lucy

lucy

Photo of concise language

concise language

Related news:

News photo

Rachel Aviv Wrote That New Yorker Story on Lucy Letby

News photo

How to build Lucy, The Ghoul, and Maximus in Fallout 4

News photo

Fallout fans are trying to estimate Lucy's XP level, following TV show finale