added generalize function
added INLINABLE pragma for generalize
Merge pull request #2 from fizruk/master

Added generalize function