Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
1 answer
886 views

Python function that deeply "freezes" an object

I implemented a function that gets an object and returns its immutable counterpart. If the object contains another mutable object at any level, it freezes it too. Is my code is good and/or can it be ...
Marco Sulla's user avatar
2 votes
1 answer
111 views

Building and querying an immutable phone book

I wanted to get your opinion on this immutable implementation of a Phone Book using recursion to process a stream. I am especially interested in ways to speed up the code execution. Here is an ...
Guillaume's user avatar
  • 123
2 votes
2 answers
817 views

Replacing an F# loop over a mutable variable by an immutable approach

Consider: let mutable m' = m while m' % i = 0L do m' <- m' / i I've refactored it into: ...
devoured elysium's user avatar