This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright 2022 Clemens Cords | |
// Created on 14.03.22 by clem (mail@clemens-cords.com) | |
// | |
#include <jluna.hpp> | |
using namespace jluna; | |
// this code are examples given as a response to https://github.com/Clemapfel/jluna/issues/12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set_xor(set::Set{T}) where T | |
res = undef | |
front::Bool = true | |
for e in set | |
if front | |
res = e | |
front = false | |
else | |
res = Base.xor(res, e) |
NewerOlder