Skip to content

Instantly share code, notes, and snippets.

View karami-mehdi's full-sized avatar
:electron:
Unfolding my own string theory

Mehdi Karami karami-mehdi

:electron:
Unfolding my own string theory
View GitHub Profile
@karami-mehdi
karami-mehdi / 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