Skip to main content
0 votes
1 answer
56 views

In Programming in Scala (5th ed), page 462, there is the following code: def isort[T](xs: List[T])(using ord: Ord[T]): List[T] = if xs.isEmpty then Nil else insert(xs.head, isort(xs.tail)) def ...
melston's user avatar
  • 2,374
0 votes
1 answer
69 views

From the Scala 3 docs on implicit conversions: In Scala 3, an implicit conversion from type S to type T is defined by a given instance of type scala.Conversion[S, T]. For compatibility with Scala 2, ...
Roberto Tyley's user avatar
0 votes
1 answer
54 views

I don't understand why an implicit TextBlock-Style is not applied in a DataGrid, unless defined in the App.xaml code. IMO it foiles the rule: the nearer to the possible consumer in the VisualTree, the ...
Felix Liebrecht's user avatar
0 votes
1 answer
42 views

I'm trying to realise simple server on FS2, which receives json message and decodes it with circe-library. My code is following: import cats.effect.{IO, IOApp, Temporal} import cats.effect.std.Console ...
Jelly's user avatar
  • 1,434
1 vote
1 answer
78 views

Given the following code (pun not intended): trait Display[A]: def display(value: A): String object Display: given stringDisplay: Display[String] with def display(input: String) = input ...
Abhijit Sarkar's user avatar
2 votes
1 answer
83 views

Here's an example that makes me scratch my head: // A trait that transforms A -> B trait Transformer[A, B] { def transform(a: A): B } // A trait that creates a Transformer which would encode `...
nedsociety's user avatar
0 votes
1 answer
61 views

I am trying to write a macro in Scala 3, which will resolve the types defined in the case class and then find for the given/implict method for those type. below is the code for macro. import scala....
Raman Mishra's user avatar
  • 2,706
1 vote
0 answers
172 views

my xcworkspace can build&run success,but when i want to pack my project to a framework,the error occurd: iPhoneOS18.0.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/...
banna's user avatar
  • 11
1 vote
1 answer
154 views

I have the following design for writing a generic data pipeline using GenericReader[+Out] and GenericWriter[-In] And a Transformer[From, To] which will convert Out => In. These readers and writers ...
Raman Mishra's user avatar
  • 2,706
2 votes
1 answer
76 views

I am working on a library for use in tests, where I want to be able to have variables that can be redefined in a particular scope. This is inspired by let in rspec. I have something working, by ...
gfxmonk's user avatar
  • 8,766
-1 votes
1 answer
72 views

so the problem is that when i create a user profile it takes user input correctly and displays it on view but when I edit it, it goes to the edit page and after click on submit it gives an error ...
Nouman Sajjad's user avatar
1 vote
1 answer
49 views

If I have a value of type I ?=> O, and I need to pass a value of I => O somewhere else, is there an idiomatic way of achieving that change?
caeus's user avatar
  • 3,794
0 votes
1 answer
60 views

Here I have some simple scala program with added extension method to type like string or int, I want to understand what I am missing here so that it works if I can do 1===1 instead of 1.toEqops=...
Depa Reddy's user avatar
1 vote
0 answers
82 views

I am trying to add a unique request id to logs for each request that is made to a rest api. For that I want to pass implicitly a MarkerContext to each logger method called. Currently the NoMarker ...
Stefan Stojkovski's user avatar
0 votes
1 answer
57 views

I need call a function def fromJsonString[Result <: B : C](jsonString: String): Result = ???. And I define a trait MyContext in order to matching a various instance of type Result. MyContext define ...
LoranceChen's user avatar
  • 2,574

15 30 50 per page
1
2 3 4 5
136