 # calls f with all arguments that has been passed
 indirect = (f) -> (params...) -> (secondaryParams...) -> f(params..., secondaryParams...)
 
-# :: o0, o1, o2, ... -> o   # merges many objects into original
-mergeMany = (original, objects...) -> reduce merge, original, objects
 
-# :: [a], [a], ... -> [a, a, ...]
-# concats many lists into one
-concatMany = (lists...) -> reduce concat, [], lists
+# ----------------------------------------------------------------------------------------------------------
+# STRING
+# ----------------------------------------------------------------------------------------------------------
+capitalize = lo.capitalize
+toStr = (a) -> a+''
 
-capitalize = _.capitalize
-toStr = (a) -> a+''
+# ----------------------------------------------------------------------------------------------------------
+# MATH
+# ----------------------------------------------------------------------------------------------------------
+clamp = curry (a, b, x) -> Math.min b, Math.max(a, x)
 
 
 
 # ----------------------------------------------------------------------------------------------------------
-# Un-pure stuff
+# UNPURE STUFF
 # ----------------------------------------------------------------------------------------------------------
-
 # unpure assoc (ie. good if you want to assoc something to a function)
 assoc_ = curry (k, v, x) ->
 	y = x

# e.g. if you want to put function calls on the same line to save space, and get better readability :)
doit = (xs..., x) -> x

isEmptyObj = eqDeep {}

# like http://ramdajs.com/docs/#pickAll but instead of undefined it returns the value of the key in the firs object
pickOr = (keysAndDefaults, o) ->
	picked = pickAll keys(keysAndDefaults), o
	valueOrDefault = (v, k) -> if v == undefined then prop(k, keysAndDefaults) else v
	return mapObjIndexed valueOrDefault, picked

# takes a function f and it's params and return a function y which can later be invoked as a callback
callback = (f, params...) -> () -> f(params...)


	return y


module.exports = {isa, dropLast, getPath, cc, ccp, doit, isEmptyObj, callback, indirect, mergeMany, assoc_, capitalize, toStr, pickOr, pathOr, isThenable, composeP2, fail, reduceObj, cloneShallow, clamp}


# deprecation line ----
