From d7493fa192b71bca4216af2f8a1ca5f024a32c01 Mon Sep 17 00:00:00 2001 From: "Hemanth.HM" Date: Wed, 3 Feb 2016 12:22:25 +0530 Subject: [PATCH] Redefined Isomorphic --- readme.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 07f09c7..5abbdda 100644 --- a/readme.md +++ b/readme.md @@ -309,7 +309,17 @@ let Identity = v => ({ chain: transform => transform(v) }) ## Isomorphic -> When the same code is shared between the client and the server. +> Two objects are Isomorphic is they satisfy the condition: `compose(to, from) == Identity` and `compose(from, to) == Identity` + +```js +const toChars = [].join; + +const fromChars = ''.split; + +fromChars.call(toChars.call([1,2,3])) // [ '1,2,3' ] + +toChars.call(fromChars.call([1,2,3])) // '1,2,3' +``` ---