Skip to content

Instantly share code, notes, and snippets.

View nsswifter's full-sized avatar
👾
Building iOS Dreams, with an Open Source Twist

Mehdi Karami nsswifter

👾
Building iOS Dreams, with an Open Source Twist
View GitHub Profile
@nsswifter
nsswifter / boleanLogic.swift
Created December 25, 2023 10:39
Swift Challenge: Cool Ways to Evaluate Two Bool Variables and Return a Result
// I have two bool variables. and I want to write a method with this logic:
// if two variables are true return .both
// and if first variable is true return .first
// and if the second one is true return .second
// otherwise return .none
enum Result {
case first
case second
case both