scala-2.8
How to make a class a member of two linked lists in Scala?
I have a feeling I\'m missing something very obvious here. I\'m converting a compiler generator written in Java into Scala as a learning exercise.开发者_如何学Python[详细]
2023-01-29 23:04 分类:问答scala Remove (in place) all elements of a ListBuffer that meet a condition
I have a ListBuffer. I want to remove all elements that meet a certain condition. I could iterate over it and remove each element. But what doe Scala say about mutating a list that you are iterating[详细]
2023-01-29 21:13 分类:问答(Not a) Scala compiler bug? (null pointer exception)
This code v(2,1) var m=Array[String]() def v(f:Int,t:Int)= {var move= (10*f+t).toString m :+ \"21\" } (run it as a scala script)[详细]
2023-01-29 16:28 分类:问答Extending Scala collections: One based Array index exercise
As an exercise, I\'d like to extend the Scala Array collection to my own OneBasedArray (does what you\'d expect, indexing starts from 1).Since this is an immutable collection, I\'d like to have it ret[详细]
2023-01-29 14:09 分类:问答Scala: Best way to iterate over collection and populate Array
scala noob here, i have a collection (Seq) of xml nodes, and i would like to populate an Array based on each node:[详细]
2023-01-29 01:33 分类:问答Buiding a stack in a map
I 开发者_C百科have a string that looks like this: \"7-6-4-1\" or \"7\" or \"\" That is, a set of numbers separated by -. There may be zero or more numbers.[详细]
2023-01-28 21:56 分类:问答How to access and update a value in a mutable map of map of maps
I\'ve a three-level data structure (indentation and line breaks for readability): scala> import scala.collection.mutable.Map[详细]
2023-01-28 07:53 分类:问答What should ",7-6-5-4-3-2-1,".split(',') return?
What should \",7-6-5-4-3-2-1,\".split(\',\') return? It seems to return blank string 7-6-5-4-3-2-1 ie. two strings. I\'d expect either one or three str开发者_开发知识库ings - that is a blank stri[详细]
2023-01-28 06:32 分类:问答Scala foldLeft on Maps
How do you use Map.foldLeft?According to the docs it looks like foldLeft [B] (z: B)(op: (B, (A, B)) ⇒ B) : B[详细]
2023-01-25 15:07 分类:问答Scala Copy() Odd Behavior
I开发者_StackOverflow社区\'m experiencing an odd bit of behavior when I use the auto-generated copy() method that was added in Scala-2.8.[详细]
2023-01-25 12:47 分类:问答