Skip to content

Instantly share code, notes, and snippets.

View shinevit's full-sized avatar
🏠
Working from home

Vitalii Radchenko shinevit

🏠
Working from home
View GitHub Profile
@shinevit
shinevit / guard-dsl.sc
Last active October 14, 2025 06:12
Minimal validation DSL for Scala 3 with cats-effect integration
#!/usr/bin/env -S scala-cli shebang
//> using scala "3.7.3"
//> using dep "org.typelevel::cats-core:2.13.0"
//> using dep "org.typelevel::cats-effect:3.6.3"
//
// Guard DSL 🛡️
// A minimal, fluent, and lazily evaluated validation DSL for Scala 3,
// with configurable error handling.
// Designed for composable argument guarding, error accumulation,