Skip to content

Instantly share code, notes, and snippets.

@indongyoo
Last active April 3, 2018 12:15
Show Gist options
  • Save indongyoo/6f626d4786c02afadb2952aabee982a2 to your computer and use it in GitHub Desktop.
Save indongyoo/6f626d4786c02afadb2952aabee982a2 to your computer and use it in GitHub Desktop.
const info = {
title: "Function",
list: new Map([
['map', 'Functor f => (a -> b) - f a -> f b'],
['reduce', 'Collection c => ((a, b) -> b) -> b -> c a -> a']
])
};
log(
reduce(
(a, [k, v]) => `${a}\n - ${k} :: ${v}`,
info.title,
info.list.entries())
);
// 결과
// Function
// - map :: Functor f => (a -> b) - f a -> f b
// - reduce :: Collection c => ((a, b) -> b) -> b -> c a -> a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment