Function icon indicating copy to clipboard operation
Function copied to clipboard

Improvement suggestions for d-decompose.js

Open igavrysh opened this issue 8 years ago • 0 comments

  • change introspect function so that it can handle objects included
  • change introspect function so that it can handle recursive objects
  • parseLines improvement so that it can process more than one space b/w parameter name and data type
  • add support for curried functions multiline structure e.g.
'use strict';

const currdObj = { 
	common: {
			sum:  (
			// Partial sum apply, use first argument
			x // first argument which should support summation opertaion
			// Example: sum(1)
			// Returns: function(y) { return 1 + y }
		) => (
			// Apply curreied sum to second argument
			y // second argument which should support summation operation
			// Example: sum(1)(2)
			// Returns: 3
		) => (
			x + y
		) 
	}
};

introspect(currdObj)

igavrysh avatar Aug 25 '17 13:08 igavrysh