This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
import org.scalatest.funspec.AsyncFunSpec | |
import org.scalatest.matchers.should.Matchers | |
import scala.concurrent.Future | |
// sbt.version=1.7.1 | |
// ThisBuild / scalaVersion := "2.13.8" | |
// Test / fork := false, | |
// Test / parallelExecution := false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examplelens | |
import monocle.macros.GenLens | |
import monocle.syntax.all._ | |
import shapeless.test.typed | |
object SampleMonocle { | |
println("run SampleMonocle") | |
val user = User.default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(dead_code)] | |
fn add_separator(txt: &str, n: usize, separator: &str) -> String { | |
txt.chars() | |
.rev() | |
.collect::<Vec<char>>() | |
.chunks(n) | |
.map(|cs| cs.iter().collect::<String>()) | |
.collect::<Vec<String>>() | |
.join(separator) |