For a 21 year old prodigy developer, what are some of the best options?
dropbox.com1 pointsby dmeb0 comments
val xs = List(1, 2, 3) // i.e. 1 -> 2 -> 3 -> Nil
val ys = 42 :: xs // i.e. 42 -> xs
In this instance, ys is a reference to a "Cons" node consisting of the value 42 and a reference to the immutable list xs. As xs is immutable, there is no risk of ys.tail changing, so we don't have to copy xs but just make a reference to it. So creating the "new" list ys only incurs the O(1) memory required to create the new node (42,xs). val xs = List(1,2,3) // 1 -> 2 -> 3 -> Nil
val zs = xs ++ List(42) // 1 -> 2 -> 3 -> 42 -> Nil
This would in fact trigger a copy of the entire list xs, as you are modifying the reference pointed to of the Cons node containing 3, requiring a copy of the entire xs so that your modification doesn't affect other references to the original xs. 1) Very large gaps between average wages of whites and blacks
2) Controlling for ability* erases almost all the disparity
3) White and black infants have same distribution of ability
4) Large disparity in ability develops between white and blacks by age 18
Disparities between whites and blacks seem to be more a product of poverty rather than bigoted employers. There is obviously more to racism than employment and wages, but this is a significant. To be clear, this is not to hand wave away a serious social problem, but rather to focus attention on the actual causes of it. If it were simply racism, there are easier solutions. Just appeal to the greed of rapacious capitalists: perfectly qualified workers from visible minorities would be underpriced wrt the majority. If instead differences in wages instead reflect differences in skills (from crappy schools, dysfunctional family environments, etc), then the problem is a little more insoluble.