#lang scribble/manual @title{BSL Primitive Operations} Pyret's BSL provides almost all of the same primitive operations that @tt{htdp/bsl+} (i.e., @emph{Beginning Student Language with list abbreviations}) provides. Additionally, since Pyret does not have @tt{require}, it also provides all functions found in the @tt{2htdp/image}, @tt{2htdp/batch-io}, and @tt{2htdp/universe} teachpacks. Some of these function names cannot be parsed properly in Pyret (e.g., @tt{string-length} would parse as @tt{(- string length)}). Therefore, there are some renaming conventions to be aware of. Hyphens and slashes are converted to underscores. So, the function @tt{string-length} becomes @tt{string_length}. Predicates go from being @tt{foo?} to @tt{is_foo}, so @tt{number?} becomes @tt{is_number}. Functions like @tt{number->string} become @tt{number_to_string}. The only functions that are outliers are shown below: @verbatim|{ string string_lt string<=? => string_leq string=? => string_equal string>=? => string_geq string>? => string_lt string-ci string_ci_lt string-ci<=? => string_ci_leq string-ci=? => string_ci_equal string-ci>=? => string_ci_geq string-ci>? => string_ci_gt string-lower-case? => string_is_lower_case string-upper-case? => string_is_upper_case string-alphabetic? => string_is_alphabetic string-whitespace? => string_is_whitespace string-numeric? => string_is_numeric string-contains? => string_contains =~ => approx_equal equal? => equal }| The @tt{car} and @tt{cdr} functions are not provided (use @tt{first} and @tt{rest} instead), and there is no @tt{is_cons} function (use @tt{is_list}). This is because Pyret does not support dotted pairs. Additionally, there is no such thing as a `character` in Pyret, so there are no function involving characters (except for @tt{string_ref}, which returns a one-character string). Finally, with the exception of images, structs no longer have accessor functions, so there is no @tt{posn_x} and @tt{posn_y} function (use `.` instead). The dot operator will work with images, but functions might be more readable. The @tt{eq} and @tt{eqv} functions are not available (and therefore neither are @tt{memq}, @tt{memv}, @tt{remq}, and @tt{remv}).