Skip to content

Instantly share code, notes, and snippets.

@vc0d35
Last active January 24, 2021 16:46
Show Gist options
  • Select an option

  • Save vc0d35/075ae3fececc389037f875dc427d9a3e to your computer and use it in GitHub Desktop.

Select an option

Save vc0d35/075ae3fececc389037f875dc427d9a3e to your computer and use it in GitHub Desktop.
import React from 'react';
import { isAReactComponentGenerator } from 'impossible-js';
// Using isAReactComponentGenerator to solve the halting problem
function checkIfHalts(fn, a) {
function g() {
fn(a);
return <h1>test</h1>;
}
return isAReactComponentGenerator(g);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment