Skip to content

Instantly share code, notes, and snippets.

enum IntegerSqrtError : Error {
case outOfBounds, noRoot
}
func isqrt(_ n: Int) throws -> Int {
if n < 1 || n > 10_000 {
throw IntegerSqrtError.outOfBounds
}
//
// ContentView.swift
// Conversion
//
// Created by nmbr73 on 07.09.22.
//
import SwiftUI
struct ContentView: View {
@nmbr73
nmbr73 / 100DaysOfSwitfUI - Day 25.swift
Created September 17, 2022 23:52
This code is a total disaster ... preserved here as a cautionary example - hope to be able to create a way better solution soon.
//
// ContentView.swift
// RockPaperScissors
//
// Created by nmbr73 on 17.09.22.
//
import SwiftUI
@nmbr73
nmbr73 / 100DaysOfSwitfUI - Day 35 - Edutainment App.swift
Created October 5, 2022 13:42
This is the 'Education' part only - it's a mess already and so I did not go down the 'Entertainment' route.
//
// ContentView.swift
// Edut(r)ainMe - Day35
//
// Created by mbr73 on 04.10.22.
//
import SwiftUI
struct Question {
@nmbr73
nmbr73 / TobiType.swift
Last active November 2, 2022 00:04
A nice text effect implemented in SwiftUI by Tobias @Dunkeeel Dunkel.
//
// TobiType.swift
//
// https://twitter.com/dunkeeel/status/1587206501004939264?s=61&t=B4d_UGPw9A9ZN3A894q5yQ
import SwiftUI
struct TobiType: View {
struct SingleLetter: View {