sneaky structural equality 🐍🧌 #3

Open
opened 2026-03-17 00:29:23 +01:00 by pena · 1 comment
Owner
open Prelude

let f = Fun.id
let f' = Fun.id
let l = [ f ]
let _b = List.mem f' l

There is a mem function in multiple module: List, Array, Hashtbl, ...

```ocaml open Prelude let f = Fun.id let f' = Fun.id let l = [ f ] let _b = List.mem f' l ``` There is a `mem` function in multiple module: `List`, `Array`, `Hashtbl`, ...
Author
Owner

For Hashtbl, I believe this could be easily fixed by simpled hiding the Hashtbl module and only exposing Hashtbl.Make? For the others, what should we do, hide List.mem and encourage users to write List.exists instead?

For Hashtbl, I believe this could be easily fixed by simpled hiding the `Hashtbl` module and only exposing `Hashtbl.Make`? For the others, what should we do, hide `List.mem` and encourage users to write `List.exists` instead?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: kumikode/prelude#3
No description provided.