\n -> newThread n
Old thread
\n -> newThread n
Old thread
Other urls found in this thread:
github.com
github.com
javascript.info
devdocs.io
en.wikipedia.org
tetris.merkoba.com
software.intel.com
milek7.pl
twitter.com
Developing desktop applications on Android
why does this give me an error?
map (\a b -> a * b) [1,2,3][4,5,6]
map applies a function over one list, and there's more than one way to apply it over two lists
If you want [4,10,18], you have to use zipWith instead of map
If you want [4,5,6,8,10,12,12,15,18], the function is liftA2
Anyway, (\a b -> a * b) is simply (*)
map doesn't zip multiple lists, it just maps one list
you end up creating a closure [Int -> Int] where every int (1, 2, 3) is mapped to a multiplication function (1 *, 2 *, 3 *), and then (mistakenly) applying a list to this, which doesn't work because a list of functions isn't a function
JavaScript rocks!
Test
>what are you doing in JS that's so performance heavy
I narrowed it down to one function that runs on input of a text field and checks that it's not a duplicate of other values, it takes an array (tested with 10 items and there's a slowdown), uses filter to remove on element, map to get a single member, then include to check if it has the text in the field. This all is wrapped in a function that returns a function in a function because that what the framework needs.
123