lyngweb: add Maven publishing configuration, range iterability tests, and minor editor refinements
This commit is contained in:
1 parent
faead76688
commit
f4375ad627
4 files changed
+41
-7
No files matched your search
@@ -74,9 +74,11 @@ fun HomePage() {
|
||||
// Code sample
|
||||
val code = """
|
||||
// Create, transform, and verify — the Lyng way
|
||||
val data = 1..5
|
||||
val evens = data.filter { it % 2 == 0 }.map { it * it }
|
||||
assertEquals([4, 16], evens)
|
||||
import lyng.stdlib
|
||||
|
||||
val data = 1..5 // or [1,2,3,4,5]
|
||||
val evens2 = data.filter { it % 2 == 0 }.map { it * it }
|
||||
assertEquals([4, 16], evens2)
|
||||
>>> void
|
||||
""".trimIndent()
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ fun TryLyngPage() {
|
||||
"""
|
||||
// Welcome to Lyng! Edit and run.
|
||||
// Try changing the data and press Ctrl+Enter or click Run.
|
||||
|
||||
val data = 1..5
|
||||
val evens = data.filter { it % 2 == 0 }.map { it * it }
|
||||
evens
|
||||
import lyng.stdlib
|
||||
|
||||
val data = 1..5 // or [1, 2, 3, 4, 5]
|
||||
data.filter { it % 2 == 0 }.map { it * it }
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -47,6 +47,7 @@ fun TryLyngPage() {
|
||||
running = true
|
||||
output = null
|
||||
error = null
|
||||
extendedError = null
|
||||
scope.launch {
|
||||
// keep this outside try so we can show partial prints if evaluation fails
|
||||
val printed = StringBuilder()
|
||||
|
||||
Reference in new issue
Block a user