Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: 1) Separate TransitionFn & OutputFn #45

Open
juancarrey opened this issue Jun 24, 2020 · 0 comments
Open

Refactor: 1) Separate TransitionFn & OutputFn #45

juancarrey opened this issue Jun 24, 2020 · 0 comments
Labels
refactor Refactoring code and making it work better
Milestone

Comments

@juancarrey
Copy link
Collaborator

juancarrey commented Jun 24, 2020

Separate into TransitionFn & OutputFn

DFSM has noop OutputFn

Handle returns still StateMachine

const void = createVoidMachine('A', 
  [
    ['A', '1', 'B'],
    ['A', '2', 'B'],
    ['B', '1', 'A'],
    ['B', '2', 'A'],
  ]
);

const mealy = createMealy('A', 
  [
    ['A', '1', 'B', '0'],
    ['A', '2', 'B', '1'],
    ['B', '1', 'A', '1'],
    ['B', '2', 'A', '2'],
  ]
);

const moore = createMoore('A', 
  [
    ['A', '1', 'B'],
    ['A', '2', 'B'],
    ['B', '1', 'A'],
    ['B', '2', 'A'],
  ],
  { 'A': 1, 'B': 0 }
);
@javierlopezdeancos javierlopezdeancos added the refactor Refactoring code and making it work better label Sep 21, 2020
@javierlopezdeancos javierlopezdeancos added this to the vMarte milestone Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring code and making it work better
Projects
None yet
Development

No branches or pull requests

2 participants