Skip to content

Instantly share code, notes, and snippets.

@vicnicius
Last active January 24, 2021 16:46
Show Gist options
  • Save vicnicius/075ae3fececc389037f875dc427d9a3e to your computer and use it in GitHub Desktop.
Save vicnicius/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