Sure. I took a quite literal ES6 way of thinking here in a way that it would require some compiling/transpiling back to original.
So maybe we could have
array(1,2,3,4,5,6) ->filter(function(num) { return num % 2 === 0; }) ->map(function(num) { return num * 2 ;})
that would then transpile into
array_map( function(num) { return num * 2; }, array_filter( [1,2,3,4,5,6], function(num) { return num % 2 === 0; } ) )
so that it would be compatible with real deal.
Like I mentioned, I'm not a language designer nor do I know much about how to make languages or compilers but this is the high-level thinking I have.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sure. I took a quite literal ES6 way of thinking here in a way that it would require some compiling/transpiling back to original.
So maybe we could have
that would then transpile into
so that it would be compatible with real deal.
Like I mentioned, I'm not a language designer nor do I know much about how to make languages or compilers but this is the high-level thinking I have.